<p dir="ltr">This goes beyond what GCC supports: there, the attribute must be given a simple identifier. I think this extension is reasonable, but please add a -Wgcc-compat warning for the cases that GCC doesn't allow. I also wonder whether there's any reason to restrict this to a DeclRefExpr, or whether we should just allow any expression of the right type. (If we make this more permissive, we'll need to document when the expression is evaluated)</p>

<div class="gmail_quote">On 4 Sep 2013 07:47, "Aaron Ballman" <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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>
</blockquote></div>