[PATCH] D97813: [FileCheck] Fix -dump-input per-pattern diagnostic indexing

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 03:52:12 PDT 2021


thopre added a comment.

LGTM otherwise.



================
Comment at: llvm/test/FileCheck/dump-input/annotations.txt:564-565
 ; Verbose diagnostics are suppressed but not errors.
-; LAB: {{.*}}error:{{.*}}
-; LAB: {{.*}}possible intended match{{.*}}
-
-; LAB:         <<<<<<
-; LAB-NEXT:               1: lab0 
-; LAB-V-NEXT:  label:1'0     ^~~~
-; LAB-V-NEXT:  label:1'1     ^~~~
-; LAB-NEXT:    label:3'0         X error: no match found
-; LAB-NEXT:               2: foo 
-; LAB-NEXT:    label:3'0     ~~~~
-; LAB-NEXT:               3: lab1 
-; LAB-NEXT:    label:3'0     ~~~~~
-; LAB-NEXT:    label:3'1     ?     possible intended match
-; LAB-NEXT:               4: bar 
-; LAB-NEXT:    label:3'0     ~~~~
-; LAB-NEXT:    >>>>>>
-; LAB-NOT:     {{.}}
+; LAB:{{.*}}error:{{.*}}
+; LAB:{{.*}}error:{{.*}}
+;         LAB:<<<<<<
----------------
That seems a bit brittle to assume there's always 2 irrelevant errors first. Also it's difficult to check for correctness without running the test manually to see what it produces. What's the actual output?


================
Comment at: llvm/test/FileCheck/dump-input/annotations.txt:576
+;    LAB-NEXT:            4: labelB 
+;  LAB-V-NEXT:label:4        ^~~~~~
+;    LAB-NEXT:check:3        ~~~~~~
----------------
Why does labelB have only one annotation but there other labels have 2?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97813/new/

https://reviews.llvm.org/D97813



More information about the llvm-commits mailing list