[PATCH] D90990: [Coroutine][Sema] Cleanup temporaries as early as possible

2020-11-10 Thread Xun Li via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG19f077092343: [Coroutine][Sema] Cleanup temporaries as early as possible (authored by lxfind). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D90990: [Coroutine][Sema] Cleanup temporaries as early as possible

2020-11-10 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90990/new/ https://reviews.llvm.org/D90990 ___ cfe

[PATCH] D90990: [Coroutine][Sema] Cleanup temporaries as early as possible

2020-11-10 Thread Xun Li via Phabricator via cfe-commits
lxfind updated this revision to Diff 304233. lxfind added a comment. Add AST test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90990/new/ https://reviews.llvm.org/D90990 Files: clang/lib/Sema/SemaCoroutine.cpp clang/test/AST/Inputs/std-corout

[PATCH] D90990: [Coroutine][Sema] Cleanup temporaries as early as possible

2020-11-10 Thread Xun Li via Phabricator via cfe-commits
lxfind added inline comments. Comment at: clang/lib/Sema/SemaCoroutine.cpp:475 + if (!AwaitSuspend) +return Calls; if (!AwaitSuspend->getType()->isDependentType()) { lxfind wrote: > bruno wrote: > > In case `AwaitSuspend` is null, is there any need to set

[PATCH] D90990: [Coroutine][Sema] Cleanup temporaries as early as possible

2020-11-10 Thread Xun Li via Phabricator via cfe-commits
lxfind added inline comments. Comment at: clang/lib/Sema/SemaCoroutine.cpp:475 + if (!AwaitSuspend) +return Calls; if (!AwaitSuspend->getType()->isDependentType()) { bruno wrote: > In case `AwaitSuspend` is null, is there any need to set `Calls.IsInvalid`

[PATCH] D90990: [Coroutine][Sema] Cleanup temporaries as early as possible

2020-11-10 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Very nice explanation, thanks for improving this! Can you also add a AST dump test? The idea is to test for the presence of `ExprWithCleanups`s. Something along the lines of `clang/test/AST/coroutine-source-location-crash.cpp` ignoring the serialization part should be go

[PATCH] D90990: [Coroutine][Sema] Cleanup temporaries as early as possible

2020-11-06 Thread Xun Li via Phabricator via cfe-commits
lxfind created this revision. Herald added subscribers: cfe-commits, modimo, wenlei, modocache. Herald added a project: clang. lxfind requested review of this revision. The original bug was discovered in T75057860. Clang front-end emits an AST that looks like this for an co_await expression: | -