[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaCXX / coroutine-traits-undefined-template.cpp
blobea25cea365b94e7d43d1c09be12c1da0a3a90071
1 // This file contains references to sections of the Coroutines TS, which can be
2 // found at http://wg21.link/coroutines.
4 // RUN: %clang_cc1 -std=c++20 -verify %s -fcxx-exceptions -fexceptions -Wunused-result
6 namespace std {
8 template<typename ...T>
9 struct coroutine_traits {
10 struct promise_type {};
13 template <> struct coroutine_traits<void>; // expected-note {{forward declaration of 'std::coroutine_traits<void>'}}
14 } // namespace std
16 void uses_forward_declaration() {
17 co_return; // expected-error {{this function cannot be a coroutine: missing definition of specialization 'coroutine_traits<void>'}}