We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85a4058 commit eeb51f2Copy full SHA for eeb51f2
clang/test/SemaCXX/coroutine-decltype.cpp …ng/test/SemaCXX/coroutine-unevaluate.cppclang/test/SemaCXX/coroutine-decltype.cpp renamed to clang/test/SemaCXX/coroutine-unevaluate.cpp
@@ -32,3 +32,11 @@ MyTask DoAnotherthing() {
32
static_assert(__is_same(void, decltype(co_yield 0))); // expected-error {{'co_yield' cannot be used in an unevaluated context}}
33
co_return;
34
}
35
+
36
+template<class>
37
+struct Task {};
38
39
+void BracedInitListCXX26() {
40
+ []() -> Task<{ co_await 1 }> {}; // expected-error {{'co_await' cannot be used in an unevaluated context}}
41
+ []() -> Task<{ co_yield 1 }> {}; // expected-error {{'co_yield' cannot be used in an unevaluated context}}
42
+}
0 commit comments