[Coroutine][Sema] Only tighten the suspend call temp lifetime for final awaiter
In https://reviews.llvm.org/D87470 I added the change to tighten the lifetime of the expression awaiter.await_suspend().address. Howver it was incorrect. ExprWithCleanups will call the dtor and end the lifetime for all the temps created in the current full expr. When this is called on a normal await call, we don't want to do that. We only want to do this for the call on the final_awaiter, to avoid writing into the frame after the frame is destroyed. This change fixes it, by checking IsImplicit. Differential Revision: https://reviews.llvm.org/D89066
Loading
Please sign in to comment