[llvm-branch-commits] [compiler-rt] [TySan] Improved compatability for tests (PR #96507)

Jeremy Morse via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 11 09:31:39 PST 2024


================
@@ -18,7 +18,7 @@ int main(void) {
 
   // CHECK:      TypeSanitizer: type-aliasing-violation on address
   // CHECK-NEXT: WRITE of size 8 at {{.+}} with type double accesses an existing object of type float
-  // CHECK-NEXT:   in main violation-pr45282.c:25
+  // CHECK-NEXT:   in main {{.*violation-pr45282.c:25.*}}
----------------
jmorse wrote:

Nit: IMO having `{{.*}}` to swallow extra path components is slightly preferable, as that avoids the filename being part of a regex. Almost certainly not ever going to be a problem, but it reduces what can go wrong. Does your environment also have trailing components after the line number? If there's any whitespace between '5' and the extra text then FileCheck will (99% confident) ignore those anyway.

Similar thoughts apply to all the other similar regexes.

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


More information about the llvm-branch-commits mailing list