[cfe-commits] r41723 - in /cfe/trunk: Parse/ParseExpr.cpp Parse/ParseObjc.cpp include/clang/Parse/Parser.h test/Parser/method-prototype-1.m

Fariborz Jahanian fjahanian at apple.com
Thu Sep 27 09:16:51 PDT 2007


On Sep 26, 2007, at 5:31 PM, Chris Lattner wrote:

>
> On Sep 26, 2007, at 5:03 PM, Fariborz Jahanian wrote:
>
>>>
>>> This predicate in Parser::ParseObjCSelector() seems really fragile  
>>> to me, because it prevents reordering of keywords in the keyword  
>>> table.  Is the idea here to allow any identifier or keyword?  If  
>>> so, a better thing to do would be:
>>>
>>> IdentifierInfo *II = Tok.getIdentifierInfo();
>>> if (II != 0)
>>>   ConsumeToken();
>>>
>>> ...
>>>
>>> This will eat and return the identifier info for anything that is  
>>> an identifier or keyword.  Would this work for your needs here?
>>
>> I am afraid not. Attached test case is all keywords allowed as  
>> selector name (this must match gcc's). We must be selective on  
>> selector names :). Maybe we can turn this into a case statement if  
>> you are not comfortable with order depenedency of this test.
>
> Ok.  In that case, please do use a switch stmt so that we get  
> exactly the cases that are desired.  Thanks!

OK. This is on my plate.

- Fariborz

>
>
> -Chris




More information about the cfe-commits mailing list