]> granicus.if.org Git - clang/commitdiff
move InitListChecker to be private to SemaInit.cpp
authorChris Lattner <sabre@nondot.org>
Tue, 24 Feb 2009 22:48:58 +0000 (22:48 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 24 Feb 2009 22:48:58 +0000 (22:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65398 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/Sema.h
lib/Sema/SemaInit.cpp

index 09cf6813cae0f71e2babdf2b52aaf4f015ec996f..7ee6e22bca15a3fcc6f792f4b173f9edcdb89f34 100644 (file)
@@ -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);
index cb2fdd2736cbacc3767b780d0978ed0e3e93e414..4b08e2813605c950a9f051a2fe17de05d7f23000 100644 (file)
@@ -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