summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/coroutines.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-11-19 02:36:35 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-11-19 02:36:35 +0000
commit9b2f53e39e992058bc2e5add5648aae1b9cad565 (patch)
treeda50f6edbd9b1561ad1ef7d3f9088b63029cb31a /clang/test/SemaCXX/coroutines.cpp
parent00b2bbb7bb5a02306095db2b39d7bf9bc12df90d (diff)
downloadbcm5719-llvm-9b2f53e39e992058bc2e5add5648aae1b9cad565.tar.gz
bcm5719-llvm-9b2f53e39e992058bc2e5add5648aae1b9cad565.zip
[coroutines] Tweak diagnostics to always use fully-qualified name for std::coroutine_traits.
llvm-svn: 253535
Diffstat (limited to 'clang/test/SemaCXX/coroutines.cpp')
-rw-r--r--clang/test/SemaCXX/coroutines.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/coroutines.cpp b/clang/test/SemaCXX/coroutines.cpp
index 3e18187295d..c82302c3c07 100644
--- a/clang/test/SemaCXX/coroutines.cpp
+++ b/clang/test/SemaCXX/coroutines.cpp
@@ -21,7 +21,12 @@ void no_specialization() {
template<typename ...T> struct std::coroutine_traits<int, T...> {};
int no_promise_type() {
- co_await a; // expected-error {{this function cannot be a coroutine: 'coroutine_traits<int>' has no member named 'promise_type'}}
+ co_await a; // expected-error {{this function cannot be a coroutine: 'std::coroutine_traits<int>' has no member named 'promise_type'}}
+}
+
+template<> struct std::coroutine_traits<double, double> { typedef int promise_type; };
+double bad_promise_type(double) {
+ co_await a; // expected-error {{this function cannot be a coroutine: 'std::coroutine_traits<double, double>::promise_type' (aka 'int') is not a class}}
}
struct promise; // expected-note {{forward declaration}}
OpenPOWER on IntegriCloud