[clang] [Win32][Coroutine] Fix inalloca arguments lifetime in coroutines (PR #212331)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 27 13:47:35 PDT 2026


etiennep-chromium wrote:

> We can't do this purely as a codegen thing; we have to model it in the AST, for a few reasons:

That makes sense, I moved some logic to SemaExpr, but still a bit a WIP. Thanks for taking a peek!

> Have you compared what MSVC does here?

There's somewhat of a lengthly discussion at https://github.com/llvm/llvm-project/issues/59382
MSVC does something different, by resequencing the order of await_suspend/await_resume to be able to construct all arguments in-place, which has its own problems: https://github.com/llvm/llvm-project/issues/59382#issuecomment-2292497402


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


More information about the cfe-commits mailing list