diff options
-rw-r--r-- | lib/Sema/SemaInit.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index f810a86250..bb523e179b 100644 --- a/lib/Sema/SemaInit.cpp +++ b/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; |