[cfe-dev] C++11 attributes parsing

Dmitri Gribenko gribozavr at gmail.com
Fri Jul 6 08:54:32 PDT 2012


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

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-dev mailing list