diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 4a8a07994ad..6e0034e37ea 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -2854,7 +2854,7 @@ CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction( Expr *Args[2] = { &DST, &SRC }; CallExpr *CalleeExp = cast<CallExpr>(PID->getSetterCXXAssignment()); CXXOperatorCallExpr TheCall(C, OO_Equal, CalleeExp->getCallee(), - Args, 2, DestTy->getPointeeType(), + Args, DestTy->getPointeeType(), VK_LValue, SourceLocation()); EmitStmt(&TheCall); @@ -2949,7 +2949,7 @@ CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction( CXXConstructExpr::Create(C, Ty, SourceLocation(), CXXConstExpr->getConstructor(), CXXConstExpr->isElidable(), - &ConstructorArgs[0], ConstructorArgs.size(), + ConstructorArgs, CXXConstExpr->hadMultipleCandidates(), CXXConstExpr->isListInitialization(), CXXConstExpr->requiresZeroInitialization(), diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 72e3e5c29aa..554aa1cb4cd 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1469,10 +1469,10 @@ CodeGenModule::MaybeEmitGlobalStdInitializerListInitializer(const VarDecl *D, // Now clone the InitListExpr to initialize the array instead. // Incredible hack: we want to use the existing InitListExpr here, so we need // to tell it that it no longer initializes a std::initializer_list. - Expr *arrayInit = new (ctx) InitListExpr(ctx, init->getLBraceLoc(), - const_cast<InitListExpr*>(init)->getInits(), - init->getNumInits(), - init->getRBraceLoc()); + ArrayRef<Expr*> Inits(const_cast<InitListExpr*>(init)->getInits(), + init->getNumInits()); + Expr *arrayInit = new (ctx) InitListExpr(ctx, init->getLBraceLoc(), Inits, + init->getRBraceLoc()); arrayInit->setType(arrayType); if (!cleanups.empty()) |