summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-24 22:48:58 +0000
committerChris Lattner <sabre@nondot.org>2009-02-24 22:48:58 +0000
commit9ececceea9df484970df3c6d1d62f4a59d66b401 (patch)
tree28eba58fd39f7c8e9a8318d7b4f1360926ede5d9 /clang/lib
parent94d2f6819f246a1af49b753b5f3b33493d427d0a (diff)
downloadbcm5719-llvm-9ececceea9df484970df3c6d1d62f4a59d66b401.tar.gz
bcm5719-llvm-9ececceea9df484970df3c6d1d62f4a59d66b401.zip
move InitListChecker to be private to SemaInit.cpp
llvm-svn: 65398
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/Sema.h1
-rw-r--r--clang/lib/Sema/SemaInit.cpp7
2 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index 09cf6813cae..7ee6e22bca1 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/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/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index cb2fdd2736c..4b08e281360 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud