aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2011-09-24 17:47:46 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2011-09-24 17:47:46 +0000
commitb0edea9f03cf81227fa35513802f8f146f65c528 (patch)
tree820e217625d5d5482ece29b9c560a70ada922e73
parent5d3d41d0873d51b405972baf38e1f3a7ef5b49e0 (diff)
Inline Sema::CheckInitList into its only user.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140455 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Sema/Sema.h2
-rw-r--r--lib/Sema/SemaInit.cpp15
2 files changed, 4 insertions, 13 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index d90db0ff9b..a1887c2245 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -5680,8 +5680,6 @@ public:
SourceLocation Loc, bool isRelational);
/// type checking declaration initializers (C99 6.7.8)
- bool CheckInitList(const InitializedEntity &Entity,
- InitListExpr *&InitList, QualType &DeclType);
bool CheckForConstantInitializer(Expr *e, QualType t);
// type checking C++ declaration initializers (C++ [dcl.init]).
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 83ea813c88..e8a35ad12b 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -2085,15 +2085,6 @@ ExprResult Sema::ActOnDesignatedInitializer(Designation &Desig,
return Owned(DIE);
}
-bool Sema::CheckInitList(const InitializedEntity &Entity,
- InitListExpr *&InitList, QualType &DeclType) {
- InitListChecker CheckInitList(*this, Entity, InitList, DeclType);
- if (!CheckInitList.HadError())
- InitList = CheckInitList.getFullyStructuredList();
-
- return CheckInitList.HadError();
-}
-
//===----------------------------------------------------------------------===//
// Initialization entity
//===----------------------------------------------------------------------===//
@@ -4510,11 +4501,13 @@ InitializationSequence::Perform(Sema &S,
case SK_ListInitialization: {
InitListExpr *InitList = cast<InitListExpr>(CurInit.get());
QualType Ty = Step->Type;
- if (S.CheckInitList(Entity, InitList, ResultType? *ResultType : Ty))
+ InitListChecker CheckInitList(S, Entity, InitList,
+ ResultType ? *ResultType : Ty);
+ if (CheckInitList.HadError())
return ExprError();
CurInit.release();
- CurInit = S.Owned(InitList);
+ CurInit = S.Owned(CheckInitList.getFullyStructuredList());
break;
}