1 // RUN: %clang_cc1 -std=c++11 -fcoroutines-ts %s -verify
3 template<typename T
, typename U
>
9 1 + co_yield t
; // expected-error {{expected expression}}
14 for co_await (int x
: t
) {}
15 for co_await (int x
= 0; x
!= 10; ++x
) {} // expected-error {{'co_await' modifier can only be applied to range-based for loop}}
24 struct X
{ Y
operator co_await(); };
26 Y
operator co_await(Z
);
29 x
.operator co_await();
33 void operator co_await(); // expected-error {{must have at least one parameter}}
34 void operator co_await(X
, Y
, Z
); // expected-error {{must be a unary operator}}
35 void operator co_await(int); // expected-error {{parameter of class or enumeration type}}