// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -emit-llvm %s -o - -disable-llvm-passes | FileCheck %s namespace std { template struct b { b(int, a); }; template struct c {}; template struct coroutine_traits : d {}; template struct coroutine_handle; template <> struct coroutine_handle<> {}; template struct coroutine_handle : coroutine_handle<> { static coroutine_handle from_address(void *) noexcept; }; struct e { int await_ready(); void await_suspend(coroutine_handle<>); void await_resume(); }; } // namespace std template auto ah(ag) { return ag().ah(0); } template struct f; struct g { struct h { int await_ready() noexcept; template void await_suspend(std::coroutine_handle) noexcept; void await_resume() noexcept; }; std::e initial_suspend(); h final_suspend() noexcept; template auto await_transform(ag) { return ah(ag()); } }; struct j : g { f>> get_return_object(); void return_value(std::b>); void unhandled_exception(); }; struct k { k(std::coroutine_handle<>); int await_ready(); }; template struct f { using promise_type = j; std::coroutine_handle<> ar; struct l : k { using at = k; l(std::coroutine_handle<> m) : at(m) {} void await_suspend(std::coroutine_handle<>); }; struct n : l { n(std::coroutine_handle<> m) : l(m) {} am await_resume(); }; auto ah(int) { return n(ar); } }; template auto ax(std::c, aw) -> f>; template struct J { static f>> bo(); }; // CHECK-LABEL: _ZN1JIiE2boEv( template f>> J::bo() { std::c bu; int bw(0); // CHECK: void @_ZN1j12return_valueESt1bISt1cIiiEE(ptr {{[^,]*}} %__promise) co_return{0, co_await ax(bu, bw)}; } void bh() { auto cn = [] { J::bo; }; cn(); }