[cfe-dev] C++11 attributes parsing

Joshua Cranmer pidgeot18 at gmail.com
Fri Jul 6 07:47:19 PDT 2012


On 7/6/2012 10:16 AM, Alexander Kornienko wrote:
> Hi all,
>
> The whole purpose of this e-mail is to gather ideas regarding our 
> needs for C++11 attributes parsing. Right now, only select attributes 
> are parsed in C++11 style, attribute arguments parsing is not 
> implemented, there's no common check for matching attribute targets 
> ("Subjects" field in Attr.td). BTW, AFAIK, the latter is not 
> implemented for GNU-style attributes either.
>
> Currently, I see the following questions:
> 1. will we allow c++11 syntax for existing GNU attributes?
> 2. what new attributes do we expect to appear in c++11 syntax?
> 3. will they require late parsing of parameters?
> 4. do we need common code for checking attribute subjects? (currently, 
> subjects are checked in handle.*Attr functions)

One addendum I have is that I think it is extremely vital that plugins 
be able to add custom attributes. I have a prototype patch which does 
this, at least for inheritable decl attributes. Ideally, we'd need to 
have an easy way to specify attribute subjects and probably attribute 
argument parsing as well; designed properly, this could eliminate a lot 
of code in Sema*Attr...

-- 
Joshua Cranmer
News submodule owner
DXR coauthor




More information about the cfe-dev mailing list