[llvm-dev] [FileCheck] Add --verbose
Tom de Vries via llvm-dev
llvm-dev at lists.llvm.org
Thu Dec 15 01:38:02 PST 2016
On 14/12/16 18:29, Robinson, Paul wrote:
> Seems pretty useful!
Hi,
Glad to hear that :)
> +1 to Jon's comments.
> Procedural remark: patches normally go to llvm-commits not llvm-dev.
> --paulr
I see, thanks for pointing that out. I'll do that for a next submission.
>
>> -----Original Message-----
>> From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of
>> Jonathan Roelofs via llvm-dev
>> Sent: Wednesday, December 14, 2016 8:09 AM
>> To: Tom de Vries; llvm-dev at lists.llvm.org; James Y Knight
>> Subject: Re: [llvm-dev] [FileCheck] Add --verbose
>>
>> +jyknight, who added --match-full-lines
>>
>>
>> On 12/14/16 5:25 AM, Tom de Vries wrote:
>>> Hi,
>>>
>>> this patch adds a --verbose option to FileCheck. [ An alternative name
>>> could be --debug or --debug-pattern. ]
>>>
>>> Consider a file CHECK:
>>> ...
>>> // CHECK-LABEL:bla1
>>> // CHECK-NEXT:bla2
>>> // CHECK-NEXT: bla3
>>> // CHECK-NEXT:bla4
>>> // CHECK-NEXT: bla5
>>> ...
>>>
>>> and a FileCheck command using --verbose:
>>> ...
>>> $ echo | FileCheck CHECK --strict-whitespace --match-full-lines --
>> verbose
>>> ...
>>>
>>> For each check the actual match pattern used is shown:
>>> ...
>>> CHECK:1:16: note: RegEx string match: '^bla1$'
>>> // CHECK-LABEL:bla1
>>> ^
>>> CHECK:2:15: note: RegEx string match: '^bla2$'
>>> // CHECK-NEXT:bla2
>>> ^
>>> CHECK:3:16: note: RegEx string match: '^bla3$'
>>> // CHECK-NEXT: bla3
>>> ^
>>> CHECK:4:15: note: RegEx string match: '^bla4$'
>>> // CHECK-NEXT:bla4
>>> ^
>>> CHECK:5:16: note: RegEx string match: '^bla5$'
>>> // CHECK-NEXT: bla5
>>> ^
>>> ...
>>>
>>> Seeing the actual match pattern allows to see the effect of command
>>> line switches that modify the original pattern (such as
>>> --match-full-lines), and help to understand why something is or is not
>>> matching.
>>>
>>> Any comments? OK for trunk?
>>
>> It needs a testcase,
Done.
>> and some docs in docs/CommandGuide/FileCheck.rst.
Done.
Any further comments? OK for trunk?
Thanks,
- Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-FileCheck-Add-verbose.patch
Type: text/x-patch
Size: 2570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161215/3b2b4824/attachment.bin>
More information about the llvm-dev
mailing list