Speculatively attempt to fix bot failures caused by recent coroutine changes.
llvm-svn: 300528
diff --git a/clang/lib/Sema/SemaCoroutine.cpp b/clang/lib/Sema/SemaCoroutine.cpp
index f891365..6d8f4fa 100644
--- a/clang/lib/Sema/SemaCoroutine.cpp
+++ b/clang/lib/Sema/SemaCoroutine.cpp
@@ -888,7 +888,7 @@
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 @@
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 @@
}
}
+ // 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 @@
if (NewRef.isInvalid())
return false;
- SmallVector<Expr *, 2> NewArgs{FrameSize};
+ SmallVector<Expr *, 2> NewArgs(1, FrameSize);
for (auto Arg : PlacementArgs)
NewArgs.push_back(Arg);