You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// CHECK-MESSAGES: :[[@LINE-1]]:17: warning: 'a' holds a lock across a suspension point of coroutine and could be unlocked by a different thread [misc-coroutine-hostile-raii]
107
-
absl::Mutex2 b;
108
-
// CHECK-MESSAGES: :[[@LINE-1]]:18: warning: 'b' holds a lock across a suspension point of coroutine and could be unlocked by a different thread [misc-coroutine-hostile-raii]
109
-
{
110
-
absl::Mutex no_warning_1;
111
-
{ absl::Mutex no_warning_2; }
112
-
}
104
+
co_yield0;
105
+
absl::Mutex a;
106
+
// CHECK-MESSAGES: :[[@LINE-1]]:17: warning: 'a' holds a lock across a suspension point of coroutine and could be unlocked by a different thread [misc-coroutine-hostile-raii]
107
+
absl::Mutex2 b;
108
+
// CHECK-MESSAGES: :[[@LINE-1]]:18: warning: 'b' holds a lock across a suspension point of coroutine and could be unlocked by a different thread [misc-coroutine-hostile-raii]
109
+
{
110
+
absl::Mutex no_warning_1;
111
+
{ absl::Mutex no_warning_2; }
112
+
}
113
113
114
-
co_yield1;
115
-
// CHECK-MESSAGES: :[[@LINE-1]]:5: note: suspension point is here
116
-
absl::Mutex c;
117
-
// CHECK-MESSAGES: :[[@LINE-1]]:17: warning: 'c' holds a lock across a suspension point of coroutine and could be unlocked by a different thread [misc-coroutine-hostile-raii]
114
+
co_yield1;
115
+
// CHECK-MESSAGES: :[[@LINE-1]]:5: note: suspension point is here
116
+
absl::Mutex c;
117
+
// CHECK-MESSAGES: :[[@LINE-1]]:17: warning: 'c' holds a lock across a suspension point of coroutine and could be unlocked by a different thread [misc-coroutine-hostile-raii]
118
+
co_await std::suspend_always{};
119
+
// CHECK-MESSAGES: :[[@LINE-1]]:5: note: suspension point is here
120
+
for(int i=1; i<=10; ++i ) {
121
+
absl::Mutex d;
122
+
// CHECK-MESSAGES: :[[@LINE-1]]:19: warning: 'd' holds a lock across a suspension point of coroutine and could be unlocked by a different thread [misc-coroutine-hostile-raii]
118
123
co_await std::suspend_always{};
119
-
// CHECK-MESSAGES: :[[@LINE-1]]:5: note: suspension point is here
120
-
for(int i=1; i<=10; ++i ) {
121
-
absl::Mutex d;
122
-
// CHECK-MESSAGES: :[[@LINE-1]]:19: warning: 'd' holds a lock across a suspension point of coroutine and could be unlocked by a different thread [misc-coroutine-hostile-raii]
123
-
co_await std::suspend_always{};
124
-
// CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
125
-
co_yield1;
126
-
absl::Mutex no_warning_3;
127
-
}
128
-
if (true) {
129
-
absl::Mutex e;
130
-
// CHECK-MESSAGES: :[[@LINE-1]]:19: warning: 'e' holds a lock across a suspension point of coroutine and could be unlocked by a different thread [misc-coroutine-hostile-raii]
131
-
co_yield1;
132
-
// CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
133
-
absl::Mutex no_warning_4;
134
-
}
135
-
absl::Mutex no_warning_5;
124
+
// CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
125
+
co_yield1;
126
+
absl::Mutex no_warning_3;
127
+
}
128
+
if (true) {
129
+
absl::Mutex e;
130
+
// CHECK-MESSAGES: :[[@LINE-1]]:19: warning: 'e' holds a lock across a suspension point of coroutine and could be unlocked by a different thread [misc-coroutine-hostile-raii]
131
+
co_yield1;
132
+
// CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
0 commit comments