================
@@ -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
----------------
ChuanqiXu9 wrote:

I feel better to explain the heap allocation elision here. I'd like to say:
in this case, the coroutine frame for the callee will be a local variable 
within the enclosing braces in the caller's stack frame. And the local 
variable, like other variables in coroutines, may be collected into the 
coroutine frame, which may be allocated on the heap.

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

Reply via email to