Inline Sema::CheckInitList into its only user.

llvm-svn: 140455
This commit is contained in:
Sebastian Redl 2011-09-24 17:47:46 +00:00
parent 26bcc942d0
commit a846cac01b
2 changed files with 4 additions and 13 deletions

View File

@ -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]).

View File

@ -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;
}