llvm-project/clang/test/SemaCXX/coroutine-traits-undefined-template.cpp
Brian Gesiak c1c681c948 [SemaCXX] Remove comment from coroutines test, NFC
Summary:
The file name was accidentally included when the test file was added.

Test Plan: check-clang

llvm-svn: 336750
2018-07-11 01:00:53 +00:00

20 lines
683 B
C++

// 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>'}}
}