[llvm] [FileCheck]: Fix diagnostic for trailing CHECK-NOT (PR #78412)

Vinayak Dev via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 02:30:23 PST 2024


================
@@ -0,0 +1,12 @@
+; RUN: rm %t && \
+; RUN: echo "LEADING: placeholder1" >>%t && echo "TRAILING-NOT: placeholder2" >>%t && \
+; RUN: %ProtectFileCheckOutput not FileCheck --strict-whitespace --check-prefixes LEADING,TRAILING --input-file %t %t 2>&1 | \ 
+; RUN: FileCheck %s
+; END
+
+CHECK:           error: TRAILING-NOT: excluded string found in input
+CHECK-NEXT:      TRAILING-NOT: placeholder2
+CHECK-NEXT: {{^}}              ^{{$}}
+CHECK-NEXT:      note: found here
+CHECK-NEXT:      TRAILING-NOT: placeholder2
+CHECK-NEXT: {{^}}              ^~~~~~~~~~~~{{$}}
----------------
vinayakdsci wrote:

Ok, thanks for replying!
I will amend the mistakes immediately.

Thanks

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


More information about the llvm-commits mailing list