summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-29 05:10:57 +0000
committerChris Lattner <sabre@nondot.org>2009-01-29 05:10:57 +0000
commitd9ae05ba501f338d45dd903dff5484110ab399f5 (patch)
treef38e9ef917500861a0c4703cdd87b03aea4359aa /clang
parentc0474013cb3fc200e5087d126d6cbf9b08aab45a (diff)
downloadbcm5719-llvm-d9ae05ba501f338d45dd903dff5484110ab399f5.tar.gz
bcm5719-llvm-d9ae05ba501f338d45dd903dff5484110ab399f5.zip
fix an absolutely inscrutible gcc 4.0 error:
llvm[0]: Compiling SemaInit.cpp for Debug build SemaInit.cpp:171: error: ‘InitListChecker’ has not been declared SemaInit.cpp:171: error: ISO C++ forbids declaration of ‘InitListChecker’ with no type SemaInit.cpp: In function ‘int InitListChecker(clang::Sema*, clang::InitListExpr*, clang::QualType&)’: SemaInit.cpp:172: error: ‘hadError’ was not declared in this scope SemaInit.cpp:173: error: ‘SemaRef’ was not declared in this scope SemaInit.cpp:177: error: ‘FullyStructuredList’ was not declared in this scope llvm-svn: 63270
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaInit.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index f810a862503..bb523e179b8 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -49,6 +49,7 @@ using namespace clang;
/// point. CheckDesignatedInitializer() recursively steps into the
/// designated subobject and manages backing out the recursion to
/// initialize the subobjects after the one designated.
+namespace clang {
class InitListChecker {
Sema *SemaRef;
bool hadError;
@@ -115,6 +116,8 @@ public:
// semantic analysis and code generation.
InitListExpr *getFullyStructuredList() const { return FullyStructuredList; }
};
+}
+
/// Recursively replaces NULL values within the given initializer list
/// with expressions that perform value-initialization of the
@@ -161,11 +164,12 @@ static void fillInValueInitializations(ASTContext &Context, InitListExpr *ILE) {
ILE->setInit(Init, new (Context) CXXZeroInitValueExpr(ElementType,
SourceLocation(),
SourceLocation()));
- else if (InitListExpr *InnerILE = dyn_cast<InitListExpr>(ILE->getInit(Init)))
+ else if (InitListExpr *InnerILE =dyn_cast<InitListExpr>(ILE->getInit(Init)))
fillInValueInitializations(Context, InnerILE);
}
}
+
InitListChecker::InitListChecker(Sema *S, InitListExpr *IL, QualType &T) {
hadError = false;
SemaRef = S;
OpenPOWER on IntegriCloud