summaryrefslogtreecommitdiffstats
path: root/llvm/test/FileCheck/dump-input-annotations.txt
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2018-12-18 00:03:36 +0000
committerJoel E. Denny <jdenny.ornl@gmail.com>2018-12-18 00:03:36 +0000
commit96f0e84ccf299f31c8dff0067d3582758ebcae43 (patch)
tree31b8b02c83fbbeb61d8f6f8d2b964d5a031c4139 /llvm/test/FileCheck/dump-input-annotations.txt
parentf7c1c4d8a497daac9dbb874bf437c882b01c37c6 (diff)
downloadbcm5719-llvm-96f0e84ccf299f31c8dff0067d3582758ebcae43.tar.gz
bcm5719-llvm-96f0e84ccf299f31c8dff0067d3582758ebcae43.zip
[FileCheck] Annotate input dump (7/7)
This patch implements annotations for diagnostics reporting CHECK-NOT failed matches. These diagnostics are enabled by -vv. As for diagnostics reporting failed matches for other directives, these annotations mark the search ranges using `X~~`. The difference here is that failed matches for CHECK-NOT are successes not errors, so they are green not red when colors are enabled. For example: ``` $ FileCheck -dump-input=help The following description was requested by -dump-input=help to explain the input annotations printed by -dump-input=always and -dump-input=fail: - L: labels line number L of the input file - T:L labels the only match result for a pattern of type T from line L of the check file - T:L'N labels the Nth match result for a pattern of type T from line L of the check file - ^~~ marks good match (reported if -v) - !~~ marks bad match, such as: - CHECK-NEXT on same line as previous match (error) - CHECK-NOT found (error) - CHECK-DAG overlapping match (discarded, reported if -vv) - X~~ marks search range when no match is found, such as: - CHECK-NEXT not found (error) - CHECK-NOT not found (success, reported if -vv) - CHECK-DAG not found after discarded matches (error) - ? marks fuzzy match when no match is found - colors success, error, fuzzy match, discarded match, unmatched input If you are not seeing color above or in input dumps, try: -color $ FileCheck -vv -dump-input=always check5 < input5 |& sed -n '/^<<<</,$p' <<<<<< 1: abcdef check:1 ^~~ not:2 X~~ 2: ghijkl not:2 ~~~ check:3 ^~~ 3: mnopqr not:4 X~~~~~ 4: stuvwx not:4 ~~~~~~ 5: eof:4 ^ >>>>>> $ cat check5 CHECK: abc CHECK-NOT: foobar CHECK: jkl CHECK-NOT: foobar $ cat input5 abcdef ghijkl mnopqr stuvwx ``` Reviewed By: george.karpenkov, probinson Differential Revision: https://reviews.llvm.org/D53899 llvm-svn: 349424
Diffstat (limited to 'llvm/test/FileCheck/dump-input-annotations.txt')
-rw-r--r--llvm/test/FileCheck/dump-input-annotations.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/test/FileCheck/dump-input-annotations.txt b/llvm/test/FileCheck/dump-input-annotations.txt
index 20598809851..3dc7f908aa2 100644
--- a/llvm/test/FileCheck/dump-input-annotations.txt
+++ b/llvm/test/FileCheck/dump-input-annotations.txt
@@ -252,7 +252,7 @@
; EMP2-NOT: {{.}}
;--------------------------------------------------
-; CHECK-NOT (also: EOF pattern)
+; CHECK-NOT (also: EOF pattern, and multiline range that ends before EOL)
;--------------------------------------------------
; No match (success) and unexpected match (error).
@@ -273,9 +273,12 @@
; NOT: <<<<<<
; NOT-NEXT: 1: hello
+; NOT-VV-NEXT: not:1 X~~~~
; NOT-NEXT: 2: world
+; NOT-VV-NEXT: not:1 ~~~~~
; NOT-NEXT: not:2 !~~~~ error: no match expected
; NOT-NEXT: 3: again
+; NOT-VV-NEXT: not:1 ~~~~~
; NOT-VV-NEXT: 4:
; NOT-VV-NEXT: eof:2 ^
; NOT-NEXT: >>>>>>
@@ -294,9 +297,12 @@
; NOT2: <<<<<<
; NOT2-NEXT: 1: hello
+; NOT2-VV-NEXT: not:1 X~~~~
; NOT2-NEXT: 2: world
+; NOT2-VV-NEXT: not:1 ~~~~~
; NOT2-NEXT: not:2 !~~~~ error: no match expected
; NOT2-NEXT: 3: again
+; NOT2-VV-NEXT: not:1 ~~
; NOT2-V-NEXT: check:3 ^~~
; NOT2-NEXT: >>>>>>
; NOT2-NOT: {{.}}
OpenPOWER on IntegriCloud