[clang-tools-extra] [clang-tidy][NFC] Migrate tests away from `--match-partial-fixes` (PR #162851)

Victor Chernyakin via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 10 07:23:43 PDT 2025


================
@@ -77,16 +77,17 @@ void test() {
   // CHECK-FIXES-NEXT: do_something("for");
   // CHECK-FIXES-NEXT: }
 
-  for (;;) {
-    do_something("for-ok");
-  }
   for (;;)
     ;
   // CHECK-MESSAGES: :[[@LINE-2]]:11: warning: statement should be inside braces
   // CHECK-FIXES: for (;;) {
   // CHECK-FIXES-NEXT: ;
   // CHECK-FIXES-NEXT: }
 
+  for (;;) {
+    do_something("for-ok");
+  }
+
----------------
localspook wrote:

This needs to be moved down because otherwise the `// CHECK-FIXES: for (;;) {` finds *this* loop, then the `// CHECK-FIXES-NEXT: ;` fails (because it found the wrong loop).

https://github.com/llvm/llvm-project/pull/162851


More information about the cfe-commits mailing list