<div dir="ltr"><div>Long term, I think we should define an enum of attribute argument forms, and TableGen a mapping from arguments to forms, rather than having a bunch of mappings from argument to bool and special cases.</div>
<div><br></div><div>That said, this patch LGTM as a shorter-term measure.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 31, 2013 at 6:52 AM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Spare time happened last night; I've attached a patch which<br>
generalizes this into something table-driven instead of relying on a<br>
hard-coded list of attributes in ParseDecl.cpp.<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Wed, Oct 30, 2013 at 10:43 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br>
> On Wed, Oct 30, 2013 at 10:00 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
>> On Wed, Oct 30, 2013 at 6:42 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>><br>
>> wrote:<br>
>>><br>
>>> Instead of hard-coding the attributes which expect a type, is there a<br>
>>> way we can gather that information off the tablegen?  They currently<br>
>>> take a TypeArgument as their first argument, so it should be pretty<br>
>>> simple to modify the attr emitter to provide a list of attributes<br>
>>> which apply.  Then the parser doesn't have hard-coded knowledge about<br>
>>> these one-offs.<br>
>><br>
>><br>
>> Yes, we should, but I didn't want to put too much into a single patch.<br>
><br>
> Makes sense; it's easy enough for me to do that work when I have some<br>
> spare time.<br>
><br>
> ~Aaron<br>
</div></div></blockquote></div><br></div>