[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:44 PDT 2025


================
@@ -151,7 +151,6 @@ void g() {
   for (int i = 0; i < 10; ++i) {
     a[i] = i;
     // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: do not use array subscript when the index is not an integer constant expression
-    // CHECK-FIXES: gsl::at(a, i) = i;
     gsl::at(a, i) = i; // OK, gsl::at() instead of []
----------------
localspook wrote:

This `// CHECK-FIXES` shouldn't be here; `cppcoreguidelines-pro-bounds-constant-array-index` only offers fixes when the `GslHeader` option is specified, and that's tested in a different file. The only reason this worked is that it matches the following line.

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


More information about the cfe-commits mailing list