<p dir="ltr">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.</p>

<div class="gmail_quote">On Aug 21, 2014 4:03 PM, "Manuel Klimek" <<a href="mailto:klimek@google.com">klimek@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote">On Thu Aug 21 2014 at 3:54:28 PM Aaron Ballman <<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

On Thu, Aug 21, 2014 at 6:45 PM, Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br>
><br>
><br>
> On Thu Aug 21 2014 at 3:37:22 PM Aaron Ballman <<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>><br>
> wrote:<br>
>><br>
>> On Thu, Aug 21, 2014 at 5:56 PM, Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br>
>> > +richard, since this is now touching lib/Basic...<br>
>> ><br>
>> > Looks good to me, but I want Richard to take a look whether this makes<br>
>> > sense or should be solved differently.<br>
>><br>
>> I am confused as to why the solution switched away from using the<br>
>> AttrKind enum value and is now using a string.<br>
><br>
><br>
> Note that the string is only for the dynamic matchers - the normal C++<br>
> matchers still use the enum.<br>
<br>
I hadn't noticed that; thank you for pointing it out! But at the risk<br>
of demonstrating my ignorance, I guess I still don't understand why<br>
the string is an improvement. AttrKinds.h is in Basic, so it's<br>
available everywhere.<br></blockquote><div><br></div><div>I'm not sure what you mean - for the dynamic matchers we definitely need to be able to construct them from a string...</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
~Aaron<br>
</blockquote></div>
</blockquote></div>