[cfe-commits] r41723 - in /cfe/trunk: Parse/ParseExpr.cpp Parse/ParseObjc.cpp include/clang/Parse/Parser.h test/Parser/method-prototype-1.m
Chris Lattner
clattner at apple.com
Wed Sep 26 17:31:02 PDT 2007
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!
-Chris
More information about the cfe-commits
mailing list