[PATCH] D81885: [Coroutines] Return false on error of buildSuspends
Xun Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 15 14:54:32 PDT 2020
lxfind created this revision.
lxfind added a reviewer: modocache.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
I believe we need to return false when buildSuspends failed, to indicate that ActOnCoroutineBodyStart failed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D81885
Files:
clang/lib/Sema/SemaCoroutine.cpp
Index: clang/lib/Sema/SemaCoroutine.cpp
===================================================================
--- clang/lib/Sema/SemaCoroutine.cpp
+++ clang/lib/Sema/SemaCoroutine.cpp
@@ -643,11 +643,11 @@
StmtResult InitSuspend = buildSuspends("initial_suspend");
if (InitSuspend.isInvalid())
- return true;
+ return false;
StmtResult FinalSuspend = buildSuspends("final_suspend");
if (FinalSuspend.isInvalid())
- return true;
+ return false;
ScopeInfo->setCoroutineSuspends(InitSuspend.get(), FinalSuspend.get());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81885.270873.patch
Type: text/x-patch
Size: 549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200615/fbcb7636/attachment.bin>
More information about the cfe-commits
mailing list