Author: ericwf Date: Tue Apr 18 00:08:08 2017 New Revision: 300528 URL: http://llvm.org/viewvc/llvm-project?rev=300528&view=rev Log: Speculatively attempt to fix bot failures caused by recent coroutine changes.
Modified: cfe/trunk/lib/Sema/SemaCoroutine.cpp Modified: cfe/trunk/lib/Sema/SemaCoroutine.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCoroutine.cpp?rev=300528&r1=300527&r2=300528&view=diff ============================================================================== --- cfe/trunk/lib/Sema/SemaCoroutine.cpp (original) +++ cfe/trunk/lib/Sema/SemaCoroutine.cpp Tue Apr 18 00:08:08 2017 @@ -888,7 +888,7 @@ bool CoroutineStmtBuilder::makeNewAndDel 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::makeNewAndDel 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::makeNewAndDel } } + // 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::makeNewAndDel if (NewRef.isInvalid()) return false; - SmallVector<Expr *, 2> NewArgs{FrameSize}; + SmallVector<Expr *, 2> NewArgs(1, FrameSize); for (auto Arg : PlacementArgs) NewArgs.push_back(Arg); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits