summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/coroutines.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-11-20 22:57:24 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-11-20 22:57:24 +0000
commit10610f7f2f1448c4414c766ec4dc936e3813df5b (patch)
treead49b9a4dfe29fc65fdc82f48f45a92bd19f41a9 /clang/test/SemaCXX/coroutines.cpp
parent0b498c7af85347160c5458cdb424a6734b0a166a (diff)
downloadbcm5719-llvm-10610f7f2f1448c4414c766ec4dc936e3813df5b.tar.gz
bcm5719-llvm-10610f7f2f1448c4414c766ec4dc936e3813df5b.zip
[coroutines] Better handling of placeholder types.
llvm-svn: 253731
Diffstat (limited to 'clang/test/SemaCXX/coroutines.cpp')
-rw-r--r--clang/test/SemaCXX/coroutines.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/coroutines.cpp b/clang/test/SemaCXX/coroutines.cpp
index 15536d83074..53226f7af21 100644
--- a/clang/test/SemaCXX/coroutines.cpp
+++ b/clang/test/SemaCXX/coroutines.cpp
@@ -140,3 +140,18 @@ namespace dependent_operator_co_await_lookup {
template void await_template(outer); // expected-note {{instantiation}}
template void await_template_2(outer);
}
+
+namespace placeholder {
+ awaitable f(), f(int); // expected-note 2{{possible target}}
+ int g(), g(int); // expected-note 4{{possible target}}
+ void x() {
+ co_await f; // expected-error {{reference to overloaded function}}
+ }
+ void y() {
+ co_yield g; // expected-error {{reference to overloaded function}}
+ }
+ void z() {
+ co_await a;
+ co_return g; // expected-error {{reference to overloaded function}}
+ }
+}
OpenPOWER on IntegriCloud