[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 27 20:25:15 PDT 2025
ChuanqiXu9 wrote:
> > Would you like to give a brief introduction for your design. I didn't figure it out.
>
> * The function signature of `__builtin_lambda_this()` is `void*()`.
> * Sema part: if it is a non-staic lambda expression (similar with this PR), create an expression `static_cast<T>(__builtin_lambda_this())` instead of `CXXThisExpr`, where `T` is `MD->getThisType()`.
> * Codegen part: handling `__builtin_lambda_this()` is similar with handling `CXXThisExpr` except that it uses `CXXABIThisValue` instead of `CXXThisValue`.
Then what is the benefits? Whatever it is, I feel this can/should be a RFC. Since it is relate to the fundamental design of AST.
https://github.com/llvm/llvm-project/pull/84193
More information about the cfe-commits
mailing list