[PATCH] D83651: [FileCheck] Report captured variables
Joel E. Denny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 12 18:48:11 PDT 2020
jdenny created this revision.
jdenny added reviewers: probinson, thopre, jhenderson, mehdi_amini.
Herald added subscribers: llvm-commits, mgrang, hiraditya, arichardson.
Herald added a project: LLVM.
Report captured variables in input dumps and traces. For example:
$ cat check
CHECK: hello [[WHAT:[a-z]+]]
CHECK: goodbye [[WHAT]]
$ FileCheck -dump-input=always -vv check < input |& tail -8
<<<<<<
1: hello world
check:1'0 ^~~~~~~~~~~
check:1'1 ^~~~~ captured var "WHAT"
2: goodbye world
check:2'0 ^~~~~~~~~~~~~
check:2'1 with "WHAT" equal to "world"
>>>>>>
$ FileCheck -dump-input=never -vv check < input
check2:1:8: remark: CHECK: expected string found in input
CHECK: hello [[WHAT:[a-z]+]]
^
<stdin>:1:1: note: found here
hello world
^~~~~~~~~~~
<stdin>:1:7: note: captured var "WHAT"
hello world
^~~~~
check2:2:8: remark: CHECK: expected string found in input
CHECK: goodbye [[WHAT]]
^
<stdin>:2:1: note: found here
goodbye world
^~~~~~~~~~~~~
<stdin>:2:1: note: with "WHAT" equal to "world"
goodbye world
^
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83651
Files:
llvm/lib/Support/FileCheck.cpp
llvm/lib/Support/FileCheckImpl.h
llvm/test/FileCheck/dump-input-annotations.txt
llvm/test/FileCheck/verbose.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83651.277312.patch
Type: text/x-patch
Size: 11788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200713/3594a530/attachment.bin>
More information about the llvm-commits
mailing list