================ @@ -8119,6 +8119,35 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroAwaitElidableDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_await_elidable]]`` is a class attribute which can be applied +to a coroutine return type. + +When a coroutine function that returns such a type calls another coroutine function, +the compiler performs heap allocation elision when the call to the coroutine function +is immediately co_awaited as a prvalue. ---------------- yuxuanchen1997 wrote:
> What I am concerning is, actually we don't care if it is prvalue or not at > all. I am actually using `isPRValue()` in Sema for this case. The right-hand side of `co_await` being a prvalue is a crucial requirement of this design. If the right-hand side is not a prvalue, we cannot do the elide safely. https://github.com/llvm/llvm-project/pull/99282 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits