================ @@ -9363,6 +9363,119 @@ Example: }]; } +def CoroAwaitSuspendDestroyDoc : Documentation { + let Category = DocCatFunction; + let Content = [{ + +The ``[[clang::coro_await_suspend_destroy]]`` attribute applies to an +``await_suspend(std::coroutine_handle<Promise>)`` member function of a +coroutine awaiter. When applied, suspensions into the awaiter use an optimized +call path that bypasses standard suspend intrinsics, and immediately destroys +the suspending coro. + +Each annotated ``await_suspend`` member must contain a compatibility stub: + +.. code-block:: c++ + + [[clang::coro_await_suspend_destroy]] + void await_suspend(std::coroutine_handle<Promise> handle) { + await_suspend_destroy(handle.promise()); + handle.destroy(); + } ---------------- ChuanqiXu9 wrote:
What does it mean? Does it say the function must be implemented as is? If yes, I feel bad for that. I prefer the previous design. https://github.com/llvm/llvm-project/pull/152623 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits