[llvm-commits] PATCH: Add CHECK-FIRST/LAST to FIleCheck
Argyris Kyrtzidis
akyrtzi at gmail.com
Wed Sep 30 14:51:14 PDT 2009
Actually, using these directives is not flexible enough, e.g you can't
use them to verify that the output is only one line.
I attached a new patch that adds 2 command lines instead:
-empty-before - Nothing comes before the first check
-empty-after - Nothing comes after the last check
If you want to make sure that the only output is the check line, you
do something like:
// RUN: FileCheck -empty-before -empty-after
// CHECK: foo
Ok to go in ?
-Argiris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filecheck2.patch
Type: application/octet-stream
Size: 2130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091001/2cdac16f/attachment.obj>
-------------- next part --------------
On Sep 30, 2009, at 11:03 PM, Chris Lattner wrote:
>
> On Sep 29, 2009, at 4:50 PM, Argyris Kyrtzidis wrote:
>
>> The attached patch adds 2 CHECK directives to the FileCheck utility:
>>
>> CHECK-FIRST: check that the string appears in the first line
>> (nothing comes before it)
>> CHECK-LAST: check that the string appears in the last line (nothing
>> comes after it)
>
> Looks great to me, please add a testcase somewhere that uses it.
>
> -Chris
More information about the llvm-commits
mailing list