Skip to content

Commit 70cfb3a

Browse files
committed
Revert "Fix tab spaces in coroutine-hostile-raii.cpp"
This reverts commit ba35986.
1 parent e4151cc commit 70cfb3a

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

clang-tools-extra/test/clang-tidy/checkers/misc/coroutine-hostile-raii.cpp

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -101,38 +101,38 @@ ReturnObject BasicNoWarning() {
101101
}
102102

103103
ReturnObject scopedLockableTest() {
104-
co_yield 0;
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-
}
104+
co_yield 0;
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+
}
113113

114-
co_yield 1;
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]
123-
co_await std::suspend_always{};
124-
// CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
125114
co_yield 1;
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_yield 1;
132-
// CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
133-
absl::Mutex no_warning_4;
134-
}
135-
absl::Mutex no_warning_5;
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]
123+
co_await std::suspend_always{};
124+
// CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
125+
co_yield 1;
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_yield 1;
132+
// CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
133+
absl::Mutex no_warning_4;
134+
}
135+
absl::Mutex no_warning_5;
136136
}
137137

138138
void lambda() {

0 commit comments

Comments
 (0)