<div dir="ltr">Your -Wgcc-compat check for DRE->hasQualifier() should also check for DRE->hasExplicitTemplateArgs(). With that and a test for it, LGTM.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 9, 2013 at 5:47 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">Ping<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Sep 4, 2013 at 3:08 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br>
> On Wed, Sep 4, 2013 at 1:35 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
>> This goes beyond what GCC supports: there, the attribute must be given a<br>
>> simple identifier. I think this extension is reasonable, but please add a<br>
>> -Wgcc-compat warning for the cases that GCC doesn't allow. I also wonder<br>
>> whether there's any reason to restrict this to a DeclRefExpr, or whether we<br>
>> should just allow any expression of the right type. (If we make this more<br>
>> permissive, we'll need to document when the expression is evaluated)<br>
><br>
> I've added another test file for ensuring we fire the -Wgcc-compat<br>
> warnings as expected. As for extending it to any expression of the<br>
> right type, that is a bit further than I was looking to take this (I<br>
> mostly wanted to get another case of unresolved identifiers out of the<br>
> way for other attribute work).<br>
><br>
> Thanks!<br>
><br>
> ~Aaron<br>
><br>
>><br>
>> On 4 Sep 2013 07:47, "Aaron Ballman" <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br>
>>><br>
>>> The cleanup attribute was using an unresolved, simple identifier as<br>
>>> its sole argument. However, while processing the attribute, we would<br>
>>> attempt to look up the simple identifier, flag its usage, etc as<br>
>>> though it were a resolved identifier. This patch removes the custom<br>
>>> logic from SemaDeclAttr.cpp and simply uses a resolved identifier<br>
>>> (DeclRefExpr) for the argument. I've added some extra test cases<br>
>>> since this expands what can be used as an argument to cleanup.<br>
>>><br>
>>> ~Aaron<br>
</div></div></blockquote></div><br></div>