[PATCH] D52999: [FileCheck] Annotate input dump (1/7)

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 7 07:51:13 PST 2018


jdenny added a comment.

Another way to improve the clarity of markers (to avoid the confusion discussed in, for example, D53898#1317412 <https://reviews.llvm.org/D53898#1317412>) occurred to me: Except for markers indicating successful completion of a directive (green `^~~` for most directives, and green `X~~` for CHECK-NOT), I could add a note at the end of the marker.  For example:

  $ FileCheck -vv -dump-input=always check4a < input4a |& sed -n '/^<<<</,$p'
  <<<<<<
           1: 01234
  check:1     ^~
  not:2         X~~
           2: 56789
  not:2       ~~~~~
           3: abcdef
  dag:3       ^~~~
  dag:4'0       !~~~ discard: overlaps earlier match
           4: cdefgh
  dag:4'1     ^~~~
  next:5          !~ error: same line as previous match
  >>>>>>
  
  $ cat check4a
  CHECK: 01
  CHECK-NOT: foobar
  CHECK-DAG: abcd
  CHECK-DAG: cdef
  CHECK-NEXT: gh
  
  $ cat input4a 
  01234
  56789
  abcdef
  cdefgh

This shouldn't add much complexity to the implementation.  Unless someone is opposed, I'll try to work on it soon.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D52999





More information about the llvm-commits mailing list