1 // RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s 2 3 #include "Inputs/std-coroutine.h" 4 5 namespace std::experimental { 6 using std::coroutine_handle; 7 using std::coroutine_traits; // expected-note{{declared here}} 8 } // namespace std::experimental 9 10 struct my_awaitable { 11 bool await_ready() noexcept; 12 void await_suspend(std::coroutine_handle<> coro) noexcept; 13 void await_resume() noexcept; 14 }; 15 16 struct promise_void { 17 void get_return_object(); 18 my_awaitable initial_suspend(); 19 my_awaitable final_suspend() noexcept; 20 void return_void(); 21 void unhandled_exception(); 22 }; 23 24 template <> 25 struct std::coroutine_traits<void> { using promise_type = promise_void; }; 26 test()27void test() { 28 co_return; 29 // expected-warning@-1{{support for std::experimental::coroutine_traits will be removed}} 30 } 31