@@ -50,7 +50,7 @@ struct MyForLoopArrayAwaiter {
50
50
};
51
51
MyForLoopArrayAwaiter g () {
52
52
int arr[10 ] = {0 };
53
- for co_await (auto i : arr) {}
53
+ for co_await (auto i : arr) {} // expected-warning {{'for co_await' belongs to CoroutineTS instead of C++20, which is deprecated}}
54
54
// expected-error@-1 {{call to deleted member function 'await_transform'}}
55
55
// expected-note@-2 {{'await_transform' implicitly required by 'co_await' here}}
56
56
}
@@ -72,14 +72,14 @@ struct ForLoopAwaiterBadBeginTransform {
72
72
};
73
73
ForLoopAwaiterBadBeginTransform bad_begin () {
74
74
Range<int > R;
75
- for co_await (auto i : R) {}
75
+ for co_await (auto i : R) {} // expected-warning {{'for co_await' belongs to CoroutineTS instead of C++20, which is deprecated}}
76
76
// expected-error@-1 {{call to deleted member function 'await_transform'}}
77
77
// expected-note@-2 {{'await_transform' implicitly required by 'co_await' here}}
78
78
}
79
79
template <class Dummy >
80
80
ForLoopAwaiterBadBeginTransform bad_begin_template (Dummy) {
81
81
Range<Dummy> R;
82
- for co_await (auto i : R) {}
82
+ for co_await (auto i : R) {} // expected-warning {{'for co_await' belongs to CoroutineTS instead of C++20, which is deprecated}}
83
83
// expected-error@-1 {{call to deleted member function 'await_transform'}}
84
84
// expected-note@-2 {{'await_transform' implicitly required by 'co_await' here}}
85
85
}
@@ -106,15 +106,15 @@ struct ForLoopAwaiterBadIncTransform {
106
106
};
107
107
ForLoopAwaiterBadIncTransform bad_inc_transform () {
108
108
Range<float > R;
109
- for co_await (auto i : R) {}
109
+ for co_await (auto i : R) {} // expected-warning {{'for co_await' belongs to CoroutineTS instead of C++20, which is deprecated}}
110
110
// expected-error@-1 {{overload resolution selected deleted operator 'co_await'}}
111
111
// expected-note@-2 {{in implicit call to 'operator++' for iterator of type 'Range<float>'}}
112
112
}
113
113
114
114
template <class Dummy >
115
115
ForLoopAwaiterBadIncTransform bad_inc_transform_template (Dummy) {
116
116
Range<Dummy> R;
117
- for co_await (auto i : R) {}
117
+ for co_await (auto i : R) {} // expected-warning {{'for co_await' belongs to CoroutineTS instead of C++20, which is deprecated}}
118
118
// expected-error@-1 {{overload resolution selected deleted operator 'co_await'}}
119
119
// expected-note@-2 {{in implicit call to 'operator++' for iterator of type 'Range<long>'}}
120
120
}
@@ -125,7 +125,7 @@ template ForLoopAwaiterBadIncTransform bad_inc_transform_template(long); // expe
125
125
template <class T >
126
126
constexpr void never_instant (T) {
127
127
static_assert (sizeof (T) != sizeof (T), " function should not be instantiated" );
128
- for co_await (auto i : foo (T{})) {}
128
+ for co_await (auto i : foo (T{})) {} // expected-warning {{'for co_await' belongs to CoroutineTS instead of C++20, which is deprecated}}
129
129
// expected-error@-1 {{'co_await' cannot be used in a constexpr function}}
130
130
}
131
131
@@ -149,7 +149,7 @@ using NS::ForLoopAwaiterCoawaitLookup;
149
149
template <class T >
150
150
ForLoopAwaiterCoawaitLookup test_coawait_lookup (T) {
151
151
Range<T> R;
152
- for co_await (auto i : R) {}
152
+ for co_await (auto i : R) {} // expected-warning {{'for co_await' belongs to CoroutineTS instead of C++20, which is deprecated}}
153
153
// expected-error@-1 {{no member named 'await_ready' in 'CoawaitTag<Iter<int>, false>'}}
154
154
}
155
155
template ForLoopAwaiterCoawaitLookup test_coawait_lookup (int ); // expected-note {{requested here}}
0 commit comments