[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

Yuxuan Chen via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 14 18:57:49 PST 2024


yuxuanchen1997 wrote:

> I still feel it would be simpler to lookup the function for `await_suspend` in the awaiter and look for its return type. Then we don't need to care about the type of the expression.

After reading a bit, I think it's possible to do this by duplicating a little bit of lookup logic in `Sema::BuildMemberReferenceExpr`. A better way might be to just see what expr `BuildMemberReferenceExpr` returns and whether that provides a good way to retrieve the member call. 

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


More information about the cfe-commits mailing list