aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/coroutines.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-03 15:20:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-03 15:20:48 +0000
commit551c698530debaae81139c7c76a29fb762793362 (patch)
tree547e0e59163c33f2142998714eb5f957e65d1a57 /test/SemaCXX/coroutines.cpp
parent416ada0f75bab22b084a1776deb229cd4a669c4d (diff)
Diffstat (limited to 'test/SemaCXX/coroutines.cpp')
-rw-r--r--test/SemaCXX/coroutines.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaCXX/coroutines.cpp b/test/SemaCXX/coroutines.cpp
index a867cf68a6e1..4eedc2162f07 100644
--- a/test/SemaCXX/coroutines.cpp
+++ b/test/SemaCXX/coroutines.cpp
@@ -892,3 +892,16 @@ void test_bad_suspend() {
co_await d; // OK
}
}
+
+template <int ID = 0>
+struct NoCopy {
+ NoCopy(NoCopy const&) = delete; // expected-note 2 {{deleted here}}
+};
+template <class T, class U>
+void test_dependent_param(T t, U) {
+ // expected-error@-1 {{call to deleted constructor of 'NoCopy<0>'}}
+ // expected-error@-2 {{call to deleted constructor of 'NoCopy<1>'}}
+ ((void)t);
+ co_return 42;
+}
+template void test_dependent_param(NoCopy<0>, NoCopy<1>); // expected-note {{requested here}}