[libcxx-commits] [clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

Chuanqi Xu via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 19 22:55:40 PDT 2025


================
@@ -284,11 +284,41 @@ static ExprResult buildCoroutineHandle(Sema &S, QualType PromiseType,
   return S.BuildCallExpr(nullptr, FromAddr.get(), Loc, FramePtr, Loc);
 }
 
+// To support [[clang::coro_await_suspend_destroy]], this builds
+//   *static_cast<Promise*>(
+//       __builtin_coro_promise(handle, alignof(Promise), false))
----------------
ChuanqiXu9 wrote:

```suggestion

```

The comment is not helpful

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


More information about the libcxx-commits mailing list