ChuanqiXu9 wrote:

> > Since the case a coroutine without a suspend point is relatively rare case 
> > to me.
> 
> For what it's worth, this issue isn't limited to coroutines without any 
> suspend point. It can also occur:
> 
> * If the coroutine conditionally doesn't await (e.g., `if (condition) { 
> co_await foo(); }` and `condition` is false)
> * If the coroutine awaits, but the awaitor's `await_ready()` returns true so 
> the coroutine doesn't suspend
> * If the coroutine suspends, but the awaitor's `await_suspend()` returns 
> false so the coroutine is immediately resumed
> * If the coroutine suspends, but the awaitor's `await_suspend()` causes the 
> coroutine to resume before the ramp function finishes (either by resuming on 
> the same thread or losing a race)
> * If the coroutine suspends, but the awaitor's `await_suspend()` returns a 
> coroutine handle whose resumption ultimately results in the current coroutine 
> resuming before the ramp function finishes

Or we can model it as, if it is possible to reach the section after coro.end 
from entry without reaching a real suspend point.

https://github.com/llvm/llvm-project/pull/127653
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to