diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-24 22:48:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-24 22:48:58 +0000 |
commit | 8b419b9b5f21cf948cf6fe788f67bf1efd97524c (patch) | |
tree | b0c56280f15b61d340efee05f3a8e5b82625a28f /lib | |
parent | 95e8d658fbea5b53c5e77c48f883fe6c9f7f620f (diff) |
move InitListChecker to be private to SemaInit.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65398 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/Sema.h | 1 | ||||
-rw-r--r-- | lib/Sema/SemaInit.cpp | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h index 09cf6813ca..7ee6e22bca 100644 --- a/lib/Sema/Sema.h +++ b/lib/Sema/Sema.h @@ -1884,7 +1884,6 @@ public: IdentifierInfo &Comp, SourceLocation CmpLoc); /// type checking declaration initializers (C99 6.7.8) - friend class InitListChecker; bool CheckInitializerTypes(Expr *&simpleInit_or_initList, QualType &declType, SourceLocation InitLoc,DeclarationName InitEntity, bool DirectInit); diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index cb2fdd2736..4b08e28136 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -11,8 +11,7 @@ // point is Sema::CheckInitList(), but all of the work is performed // within the InitListChecker class. // -// This file also includes some miscellaneous other initialization checking -// code that is part of Sema. +// This file also implements Sema::CheckInitializerTypes. // //===----------------------------------------------------------------------===// @@ -202,7 +201,7 @@ bool Sema::CheckInitializerTypes(Expr *&Init, QualType &DeclType, /// point. CheckDesignatedInitializer() recursively steps into the /// designated subobject and manages backing out the recursion to /// initialize the subobjects after the one designated. -namespace clang { +namespace { class InitListChecker { Sema *SemaRef; bool hadError; @@ -279,7 +278,7 @@ public: // semantic analysis and code generation. InitListExpr *getFullyStructuredList() const { return FullyStructuredList; } }; -} +} // end anonymous namespace /// Recursively replaces NULL values within the given initializer list /// with expressions that perform value-initialization of the |