[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / SemaCXX / coroutine-traits-undefined-template-exp-namespace.cpp
blobc71023ad5af5c5251608afe79f4a7eb5ac134816
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++14 -fcoroutines-ts -verify %s -fcxx-exceptions -fexceptions -Wunused-result
6 namespace std {
7 namespace experimental {
8 template <typename... T>
9 struct coroutine_traits { // expected-note{{declared here}}
10 struct promise_type {};
13 template <> struct coroutine_traits<void>; // expected-note {{forward declaration of 'std::experimental::coroutine_traits<void>'}}
14 } // namespace experimental
15 } // namespace std
17 void uses_forward_declaration() {
18 co_return; // expected-error {{this function cannot be a coroutine: missing definition of specialization 'coroutine_traits<void>'}}
19 // expected-warning@-1 {{support for std::experimental::coroutine_traits will be removed}}