[PATCH] Switch type used by FormatAttr

Aaron Ballman aaron at aaronballman.com
Tue Sep 3 14:05:01 PDT 2013


getTypeIdent() already returns an IdentifierInfo (it's table
generated).  I added getType() to return a StringRef so it'd be
compatible with the previous interface, but it seems there's only
three places it was being used.  I've removed the AdditionalMember and
fixed those two places up instead, and committed as r189851.

Thanks!

~Aaron

On Tue, Sep 3, 2013 at 4:28 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Tue, Sep 3, 2013 at 1:03 PM, Aaron Ballman <aaron at aaronballman.com>
> wrote:
>>
>> The tablegen for the format attribute claims the first argument
>> expected is a string.  However, the attribute actually takes an
>> unresolved identifier instead of a string literal.  This patch
>> clarifies that by making the attribute take an IdentifierArgument, and
>> updates associated code.
>>
>> Since this is the only case where the parser was doing something
>> special for StringArguments, I updated the tablegen emitter to remove
>> complexity.
>>
>
> Is there any reason to not just make FormatAttr::getType() return an
> IdentifierInfo?
>
> Otherwise, looks fine.
>
> -Eli



More information about the cfe-commits mailing list