[PATCH] Cleanup attribute using resolved identifiers

Richard Smith richard at metafoo.co.uk
Wed Sep 4 10:35:07 PDT 2013


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)
On 4 Sep 2013 07:47, "Aaron Ballman" <aaron at aaronballman.com> wrote:

> The cleanup attribute was using an unresolved, simple identifier as
> its sole argument.  However, while processing the attribute, we would
> attempt to look up the simple identifier, flag its usage, etc as
> though it were a resolved identifier.  This patch removes the custom
> logic from SemaDeclAttr.cpp and simply uses a resolved identifier
> (DeclRefExpr) for the argument.  I've added some extra test cases
> since this expands what can be used as an argument to cleanup.
>
> ~Aaron
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130904/09e3b647/attachment.html>


More information about the cfe-commits mailing list