[cfe-commits] r65398 - in /cfe/trunk/lib/Sema: Sema.h SemaInit.cpp

Chris Lattner sabre at nondot.org
Tue Feb 24 14:48:58 PST 2009


Author: lattner
Date: Tue Feb 24 16:48:58 2009
New Revision: 65398

URL: http://llvm.org/viewvc/llvm-project?rev=65398&view=rev
Log:
move InitListChecker to be private to SemaInit.cpp

Modified:
    cfe/trunk/lib/Sema/Sema.h
    cfe/trunk/lib/Sema/SemaInit.cpp

Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=65398&r1=65397&r2=65398&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Tue Feb 24 16:48:58 2009
@@ -1884,7 +1884,6 @@
                                    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);

Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=65398&r1=65397&r2=65398&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Tue Feb 24 16:48:58 2009
@@ -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 @@
 /// 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 @@
   // 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





More information about the cfe-commits mailing list