Author: Utkarsh Saxena
Date: 2023-11-21T08:08:09+01:00
New Revision: 70cfb3a367f51d805dc5cfc5a54dfc7271a23095

URL: 
https://github.com/llvm/llvm-project/commit/70cfb3a367f51d805dc5cfc5a54dfc7271a23095
DIFF: 
https://github.com/llvm/llvm-project/commit/70cfb3a367f51d805dc5cfc5a54dfc7271a23095.diff

LOG: Revert "Fix tab spaces in coroutine-hostile-raii.cpp"

This reverts commit ba3598667f0da87961b6bec390bc7b03cfa72583.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/coroutine-hostile-raii.cpp 
b/clang-tools-extra/test/clang-tidy/checkers/misc/coroutine-hostile-raii.cpp
index 6e8f8e333d4fecb..2d022e21c85d566 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/coroutine-hostile-raii.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/coroutine-hostile-raii.cpp
@@ -101,38 +101,38 @@ ReturnObject BasicNoWarning() {
 }
 
 ReturnObject scopedLockableTest() {
-  co_yield 0;
-  absl::Mutex a;
-  // CHECK-MESSAGES: :[[@LINE-1]]:17: warning: 'a' holds a lock across a 
suspension point of coroutine and could be unlocked by a 
diff erent thread [misc-coroutine-hostile-raii]
-  absl::Mutex2 b;
-  // CHECK-MESSAGES: :[[@LINE-1]]:18: warning: 'b' holds a lock across a 
suspension point of coroutine and could be unlocked by a 
diff erent thread [misc-coroutine-hostile-raii]
-  {
-      absl::Mutex no_warning_1;
-      { absl::Mutex no_warning_2; }
-  }
+    co_yield 0;
+    absl::Mutex a;
+    // CHECK-MESSAGES: :[[@LINE-1]]:17: warning: 'a' holds a lock across a 
suspension point of coroutine and could be unlocked by a 
diff erent thread [misc-coroutine-hostile-raii]
+    absl::Mutex2 b;
+    // CHECK-MESSAGES: :[[@LINE-1]]:18: warning: 'b' holds a lock across a 
suspension point of coroutine and could be unlocked by a 
diff erent thread [misc-coroutine-hostile-raii]
+    {
+        absl::Mutex no_warning_1;
+        { absl::Mutex no_warning_2; }
+    }
 
-  co_yield 1;
-  // CHECK-MESSAGES: :[[@LINE-1]]:5: note: suspension point is here
-  absl::Mutex c;
-  // CHECK-MESSAGES: :[[@LINE-1]]:17: warning: 'c' holds a lock across a 
suspension point of coroutine and could be unlocked by a 
diff erent thread [misc-coroutine-hostile-raii]
-  co_await std::suspend_always{};
-  // CHECK-MESSAGES: :[[@LINE-1]]:5: note: suspension point is here
-  for(int i=1; i<=10; ++i ) {
-    absl::Mutex d;
-    // CHECK-MESSAGES: :[[@LINE-1]]:19: warning: 'd' holds a lock across a 
suspension point of coroutine and could be unlocked by a 
diff erent thread [misc-coroutine-hostile-raii]
-    co_await std::suspend_always{};
-    // CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
     co_yield 1;
-    absl::Mutex no_warning_3;
-  }
-  if (true) {
-    absl::Mutex e;
-    // CHECK-MESSAGES: :[[@LINE-1]]:19: warning: 'e' holds a lock across a 
suspension point of coroutine and could be unlocked by a 
diff erent thread [misc-coroutine-hostile-raii]
-    co_yield 1;
-    // CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
-    absl::Mutex no_warning_4;
-  }
-  absl::Mutex no_warning_5;
+    // CHECK-MESSAGES: :[[@LINE-1]]:5: note: suspension point is here
+    absl::Mutex c;
+    // CHECK-MESSAGES: :[[@LINE-1]]:17: warning: 'c' holds a lock across a 
suspension point of coroutine and could be unlocked by a 
diff erent thread [misc-coroutine-hostile-raii]
+    co_await std::suspend_always{};
+    // CHECK-MESSAGES: :[[@LINE-1]]:5: note: suspension point is here
+    for(int i=1; i<=10; ++i ) {
+      absl::Mutex d;
+      // CHECK-MESSAGES: :[[@LINE-1]]:19: warning: 'd' holds a lock across a 
suspension point of coroutine and could be unlocked by a 
diff erent thread [misc-coroutine-hostile-raii]
+      co_await std::suspend_always{};
+      // CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
+      co_yield 1;
+      absl::Mutex no_warning_3;
+    }
+    if (true) {
+      absl::Mutex e;
+      // CHECK-MESSAGES: :[[@LINE-1]]:19: warning: 'e' holds a lock across a 
suspension point of coroutine and could be unlocked by a 
diff erent thread [misc-coroutine-hostile-raii]
+      co_yield 1;
+      // CHECK-MESSAGES: :[[@LINE-1]]:7: note: suspension point is here
+      absl::Mutex no_warning_4;
+    }
+    absl::Mutex no_warning_5;
 }
 
 void lambda() {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to