[llvm-commits] PATCH: FileCheck to allow referencing vars defined on the same line

Dmitri Gribenko gribozavr at gmail.com
Sat Dec 1 13:21:24 PST 2012


On Sat, Dec 1, 2012 at 10:53 PM, Eli Bendersky <eliben at google.com> wrote:
> The code I added follows the style in FileCheck.cpp

OK.

>> Please also don't duplicate the comment in .cpp file.
>
> I'm not sure what this refers to, could you clarify?

I didn't mean to copy that, sorry.

>>> If this looks alright to people, I will also update the FileCheck
>>> documentation and probably add some more tests.
>>
>> Please add tests that check that we count parentheses in user's
>> regexes correctly (i.e., that CurParen is correct).
>>
>
> I'm not sure I understand what you mean here, could you give an
> example? Is this testing the added feature or existing functionality?

This is for existing functionality, but is related to this feature.  I
mean something like this:

op1 r1, r2, r1

; CHECK: {{([a-z]+[0-9])+}} [[REG:r[0-9]+]], {{r[0-9]+}}, [[REG]]

Where we have parentheses inside a regexp.  These should be counted in
'CurParen' correctly so that we get the backreference number right.
It was already done before to correctly capture variables, but this
feature depends on this, too.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the llvm-commits mailing list