It is to make the interface a bit easier. The dynamic matcher is at runtime
where we don't have access to the constants. So the string conversion
allows referring to attributes via a name instead of raw the enum value.
On Aug 21, 2014 4:03 PM, "Manuel Klimek" <[email protected]> wrote:

>
>
> On Thu Aug 21 2014 at 3:54:28 PM Aaron Ballman <[email protected]>
> wrote:
>
>> On Thu, Aug 21, 2014 at 6:45 PM, Manuel Klimek <[email protected]> wrote:
>> >
>> >
>> > On Thu Aug 21 2014 at 3:37:22 PM Aaron Ballman <[email protected]>
>> > wrote:
>> >>
>> >> On Thu, Aug 21, 2014 at 5:56 PM, Manuel Klimek <[email protected]>
>> wrote:
>> >> > +richard, since this is now touching lib/Basic...
>> >> >
>> >> > Looks good to me, but I want Richard to take a look whether this
>> makes
>> >> > sense or should be solved differently.
>> >>
>> >> I am confused as to why the solution switched away from using the
>> >> AttrKind enum value and is now using a string.
>> >
>> >
>> > Note that the string is only for the dynamic matchers - the normal C++
>> > matchers still use the enum.
>>
>> I hadn't noticed that; thank you for pointing it out! But at the risk
>> of demonstrating my ignorance, I guess I still don't understand why
>> the string is an improvement. AttrKinds.h is in Basic, so it's
>> available everywhere.
>>
>
> I'm not sure what you mean - for the dynamic matchers we definitely need
> to be able to construct them from a string...
>
>
>>
>> ~Aaron
>>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to