summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCoroutine.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-04-18 05:08:08 +0000
committerEric Fiselier <eric@efcs.ca>2017-04-18 05:08:08 +0000
commitf747f53238523a0230daaead55d7421b67ae0c67 (patch)
tree1ac989c5369bed76f55be471326d6c2350a9f4e3 /clang/lib/Sema/SemaCoroutine.cpp
parent9eaef07519ddba4157dba5b7143a4c9c8a9175ce (diff)
downloadbcm5719-llvm-f747f53238523a0230daaead55d7421b67ae0c67.tar.gz
bcm5719-llvm-f747f53238523a0230daaead55d7421b67ae0c67.zip
Speculatively attempt to fix bot failures caused by recent coroutine changes.
llvm-svn: 300528
Diffstat (limited to 'clang/lib/Sema/SemaCoroutine.cpp')
-rw-r--r--clang/lib/Sema/SemaCoroutine.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaCoroutine.cpp b/clang/lib/Sema/SemaCoroutine.cpp
index f891365efd4..6d8f4fac01d 100644
--- a/clang/lib/Sema/SemaCoroutine.cpp
+++ b/clang/lib/Sema/SemaCoroutine.cpp
@@ -888,7 +888,7 @@ bool CoroutineStmtBuilder::makeNewAndDeleteExpr() {
FunctionDecl *OperatorDelete = nullptr;
FunctionDecl *UnusedResult = nullptr;
bool PassAlignment = false;
- MultiExprArg PlacementArgs = None;
+ SmallVector<Expr *, 1> PlacementArgs;
S.FindAllocationFunctions(Loc, SourceRange(),
/*UseGlobal*/ false, PromiseType,
@@ -904,7 +904,7 @@ bool CoroutineStmtBuilder::makeNewAndDeleteExpr() {
auto *StdNoThrow = buildStdNoThrowDeclRef(S, Loc);
if (!StdNoThrow)
return false;
- PlacementArgs = MultiExprArg(StdNoThrow);
+ PlacementArgs = {StdNoThrow};
OperatorNew = nullptr;
S.FindAllocationFunctions(Loc, SourceRange(),
/*UseGlobal*/ true, PromiseType,
@@ -924,6 +924,9 @@ bool CoroutineStmtBuilder::makeNewAndDeleteExpr() {
}
}
+ // FIXME: Diagnose and handle the case where no matching operator new is found
+ // (ie OperatorNew == nullptr)
+
if ((OperatorDelete = findDeleteForPromise(S, Loc, PromiseType)) == nullptr)
return false;
@@ -940,7 +943,7 @@ bool CoroutineStmtBuilder::makeNewAndDeleteExpr() {
if (NewRef.isInvalid())
return false;
- SmallVector<Expr *, 2> NewArgs{FrameSize};
+ SmallVector<Expr *, 2> NewArgs(1, FrameSize);
for (auto Arg : PlacementArgs)
NewArgs.push_back(Arg);
OpenPOWER on IntegriCloud