[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type convertible to `std::coroutine_handle<>` (PR #85684)

Yuxuan Chen via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 20 10:57:22 PDT 2024


yuxuanchen1997 wrote:

> > I am also ok with changing the patch to reject programs whose await_suspend doesn't strictly return std::coroutine_handle if upstream prefers.
> 
> It should be good to do that since it makes the behavior more conforming. And maybe it is better to do this a seperate patch. Especially if it can help reduce the many non-semantical changes in SemaExprCXX.cpp.

Would prefer separate patch. In `SemaExprCXX.cpp` there's `EvaluateBinaryTypeTraits` that I needed to expose as suggested by the comment in SemaCoroutine. Is there an alternative way to do type coercion/equivalence checks?

https://github.com/llvm/llvm-project/pull/85684


More information about the cfe-commits mailing list