[clang-tools-extra] [clang-tidy][NFC] Remove regex hacks to match full lines in tests (PR #162293)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 7 23:55:52 PDT 2025
================
@@ -236,69 +236,69 @@ void unittest_b1_09_00() {
CC100;
if(1 && 1) {
-// CHECK-NOTES: :[[@LINE-1]]:3: note: +1, including nesting penalty of 0, nesting level increased to 1{{$}}
-// CHECK-NOTES: :[[@LINE-2]]:8: note: +1{{$}}
+// CHECK-NOTES: :[[@LINE-1]]:3: note: +1, including nesting penalty of 0, nesting level increased to 1
+// CHECK-NOTES: :[[@LINE-2]]:8: note: +1
----------------
localspook wrote:
Oh that's a good point. Indeed it looks like we're not:
https://github.com/llvm/llvm-project/blob/a29d7a1f04ce2ba50300398fc5670b499e5d89d9/clang-tools-extra/test/clang-tidy/check_clang_tidy.py#L292-L300
Which actually make sense, since the full lines look like:
```txt
/path/to/test-name.cpp.tmp.cpp:<LINE>:<COL>: warning: <MESSAGE> [<CHECK-NAME>]
```
And we don't care about matching anything before `<LINE>`.
Same applies to `// CHECK-MESSAGES`. I've gone and restored the `{{$}}` for both of them.
https://github.com/llvm/llvm-project/pull/162293
More information about the cfe-commits
mailing list