diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
commit | 486754660bb926339aefcf012a3f848592babb8b (patch) | |
tree | ecdbc446c9876f4f120f701c243373cd3cb43db3 /test/SemaCXX/coroutine-traits-undefined-template.cpp | |
parent | 55e6d896ad333f07bb3b1ba487df214fc268a4ab (diff) |
Notes
Diffstat (limited to 'test/SemaCXX/coroutine-traits-undefined-template.cpp')
-rw-r--r-- | test/SemaCXX/coroutine-traits-undefined-template.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaCXX/coroutine-traits-undefined-template.cpp b/test/SemaCXX/coroutine-traits-undefined-template.cpp new file mode 100644 index 0000000000000..4687ed245ac84 --- /dev/null +++ b/test/SemaCXX/coroutine-traits-undefined-template.cpp @@ -0,0 +1,19 @@ +// This file contains references to sections of the Coroutines TS, which can be +// found at http://wg21.link/coroutines. + +// RUN: %clang_cc1 -std=c++14 -fcoroutines-ts -verify %s -fcxx-exceptions -fexceptions -Wunused-result + +namespace std { +namespace experimental { + +template<typename ...T> +struct coroutine_traits { + struct promise_type {}; +}; + +template<> struct coroutine_traits<void>; // expected-note {{forward declaration of 'std::experimental::coroutine_traits<void>'}} +}} // namespace std::experimental + +void uses_forward_declaration() { + co_return; // expected-error {{this function cannot be a coroutine: missing definition of specialization 'coroutine_traits<void>'}} +} |