[llvm-commits] PATCH: Add CHECK-FIRST/LAST to FIleCheck
Argyris Kyrtzidis
akyrtzi at gmail.com
Wed Sep 30 15:19:21 PDT 2009
On Oct 1, 2009, at 12:53 AM, Chris Lattner wrote:
>
> On Sep 30, 2009, at 2:51 PM, Argyris Kyrtzidis wrote:
>
>> 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 ?
>
> can't CHECK-NOT be used for this? If a NOT could be added before
> the first line, then you could do CHECK-NOT: {{.}} or something like
> that.
"CHECK-NOT: {{.}}" is not good because it will reject inputs that have
characters on the same line as 'foo', e.g.
"bar foo"
should be a valid input but the above CHECK-NOT will reject it.
I couldn't put a CHECK-NOT to work as the -empty-before (and -after),
any suggestions ?
-Argiris
More information about the llvm-commits
mailing list