[cfe-dev] C++11 attributes parsing

Sean Hunt scshunt at google.com
Fri Jul 6 09:19:44 PDT 2012


On Fri, Jul 6, 2012 at 11:54 AM, Dmitri Gribenko <gribozavr at gmail.com>wrote:

> Hi Alexander,
>
> On Fri, Jul 6, 2012 at 7:16 AM, Alexander Kornienko <alexfh at google.com>
> wrote:
> > 4. do we need common code for checking attribute subjects? (currently,
> > subjects are checked in handle.*Attr functions)
>
> It would be awesome if we could automatically generate with TableGen
> most of subject checking and argument checking.  It seems like we can
> because SemaDeclAttr.cpp is mostly boring copy-pasted code.  I think
> that we could describe attribute arguments declaratively in Attr.td
> and remove most argument checks in SemaDeclAttr.cpp (like, is this an
> ICE?  is this an ICE that is a valid function argument number?  is
> that a string literal? etc), thus leaving only important
> attribute-specific checks to be manually written.
>
> Dmitri


This was always the goal. I wanted to unify parsing of arguments first, but
there's no reason in principle that handle*Attr couldn't go first, I think.

Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120706/05144f31/attachment.html>


More information about the cfe-dev mailing list