summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/coroutines.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/coroutines.cpp')
-rw-r--r--clang/test/SemaCXX/coroutines.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/coroutines.cpp b/clang/test/SemaCXX/coroutines.cpp
index 9e15217031e..15536d83074 100644
--- a/clang/test/SemaCXX/coroutines.cpp
+++ b/clang/test/SemaCXX/coroutines.cpp
@@ -44,7 +44,7 @@ void undefined_promise() { // expected-error {{variable has incomplete type 'pro
co_await a;
}
-struct yielded_thing { int a, b, c; const char *p; };
+struct yielded_thing { const char *p; short a, b; };
struct promise {
awaitable yield_value(int); // expected-note {{candidate}}
@@ -53,7 +53,10 @@ struct promise {
void yield() {
co_yield 0;
- co_yield {1, 2, 3, "foo"}; // FIXME expected-error {{expected expression}}
+ co_yield {"foo", 1, 2};
+ co_yield {1e100}; // expected-error {{cannot be narrowed}} expected-note {{explicit cast}} expected-warning {{changes value}} expected-warning {{braces around scalar}}
+ co_yield {"foo", __LONG_LONG_MAX__}; // expected-error {{cannot be narrowed}} expected-note {{explicit cast}} expected-warning {{changes value}}
+ co_yield {"foo"};
co_yield "foo"; // expected-error {{no matching}}
}
OpenPOWER on IntegriCloud