[llvm-dev] [FileCheck] Add --verbose

Robinson, Paul via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 14 09:29:24 PST 2016


Seems pretty useful!
+1 to Jon's comments.
Procedural remark: patches normally go to llvm-commits not llvm-dev.
--paulr

> -----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, and some docs in docs/CommandGuide/FileCheck.rst.
> 
> 
> Jon
> 
> >
> > Thanks,
> > - Tom
> 
> --
> Jon Roelofs
> jonathan at codesourcery.com
> CodeSourcery / Mentor Embedded
> 
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list