diff options
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r-- | lib/Sema/SemaInit.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 1c4e2c837a..7b4a41777b 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -280,7 +280,7 @@ void InitListChecker::FillInValueInitForField(unsigned Init, FieldDecl *Field, // extend the initializer list to include the constructor // call and make a note that we'll need to take another pass // through the initializer list. - ILE->updateInit(SemaRef.Context, Init, MemberInit.takeAs<Expr>()); + ILE->updateInit(Init, MemberInit.takeAs<Expr>()); RequiresSecondPass = true; } } else if (InitListExpr *InnerILE @@ -390,7 +390,7 @@ InitListChecker::FillInValueInitializations(const InitializedEntity &Entity, // extend the initializer list to include the constructor // call and make a note that we'll need to take another pass // through the initializer list. - ILE->updateInit(SemaRef.Context, Init, ElementInit.takeAs<Expr>()); + ILE->updateInit(Init, ElementInit.takeAs<Expr>()); RequiresSecondPass = true; } } else if (InitListExpr *InnerILE @@ -1669,8 +1669,8 @@ InitListChecker::getStructuredSubobjectInit(InitListExpr *IList, unsigned Index, } InitListExpr *Result - = new (SemaRef.Context) InitListExpr(SemaRef.Context, InitRange.getBegin(), - 0, 0, InitRange.getEnd()); + = new (SemaRef.Context) InitListExpr(InitRange.getBegin(), 0, 0, + InitRange.getEnd()); Result->setType(CurrentObjectType.getNonReferenceType()); @@ -1707,12 +1707,12 @@ InitListChecker::getStructuredSubobjectInit(InitListExpr *IList, unsigned Index, if (NumElements < NumInits) NumElements = IList->getNumInits(); - Result->reserveInits(SemaRef.Context, NumElements); + Result->reserveInits(NumElements); // Link this new initializer list into the structured initializer // lists. if (StructuredList) - StructuredList->updateInit(SemaRef.Context, StructuredIndex, Result); + StructuredList->updateInit(StructuredIndex, Result); else { Result->setSyntacticForm(IList); SyntacticToSemantic[IList] = Result; @@ -1730,8 +1730,7 @@ void InitListChecker::UpdateStructuredListElement(InitListExpr *StructuredList, if (!StructuredList) return; - if (Expr *PrevInit = StructuredList->updateInit(SemaRef.Context, - StructuredIndex, expr)) { + if (Expr *PrevInit = StructuredList->updateInit(StructuredIndex, expr)) { // This initializer overwrites a previous initializer. Warn. SemaRef.Diag(expr->getSourceRange().getBegin(), diag::warn_initializer_overrides) |