[clang][PR55406] CFG for coroutine
authorNathan Sidwell <nathan@acm.org>
Wed, 25 May 2022 17:11:39 +0000 (10:11 -0700)
committerNathan Sidwell <nathan@acm.org>
Thu, 26 May 2022 13:40:43 +0000 (06:40 -0700)
commit6b8c6f15fdd8c147dfb7b0beb6f3d6eb98bf5772
treed6c69a06fa4ffa193bfd8bca17441a67264638db
parent6f434776da0ba2c1dd666470e0ddef7954a21c76
[clang][PR55406] CFG for coroutine

CoreturnStmt needs to keep the operand value distinct from its use in
any return_value call, so that instantiation may rebuild the latter.
But it also needs to keep the operand value separate in the case of
calling return_void.  Code generation checks the operand value form to
determine whether it is a distincte entity to the promise call.  This
adds the same logic to CFG generation.

Reviewed By: bruno

Differential Revision: https://reviews.llvm.org/D126399
clang/lib/Analysis/CFG.cpp
clang/test/SemaCXX/thread-safety-coro.cpp [new file with mode: 0644]