[cfe-dev] [Request for approval] Identifier text in raw lexing

Chris Lattner clattner at apple.com
Tue Dec 21 23:00:08 PST 2010


On Dec 17, 2010, at 12:19 AM, Enea Zaffanella wrote:

> Il 15/12/2010 08:52, Chris Lattner ha scritto:
>> 
>> On Dec 7, 2010, at 1:32 AM, Abramo Bagnara wrote:
> [...]
>>> I've attached the working patch for approval.
>> 
>> Hi Abramo,
>> 
>> This approach looks ok in principle, but I have some nit-pics about
>> your patch :)
> [...]
>> You seem to have search and replaced all uses of tok::identifier with
>> isIdentifier.  However, raw_identifiers can't get into the parser and
>> can't get into most places in the preprocessor.  Please keep these as
>> checks of just tok::identifier.  Only code that can actually get both
>> should use "isIdentifier".  Also, for the same reason, please rename
>> isIdentifier to isAnyIdentifier.
> [...]
>> While I was initially
>> skeptical of the approach, I think it will lead to a nice cleanup of
>> existing code (and is the right thing to do), but it is important not
>> to scatter "isIdentifiers" everywhere, and important to make use of
>> the new capabilities!
>> 
>> Thanks for working on this,
>> 
>> -Chris
> 
> Here is the revised patch. It passes all clang tests, but we would
> really appreciate to have it reviewed again before commit.

Sorry for the delay, this patch looks really great to me.  Please commit!

-Chris



More information about the cfe-dev mailing list