[cfe-dev] C++11 attributes parsing

John McCall rjmccall at apple.com
Fri Jul 6 10:29:04 PDT 2012

On Jul 6, 2012, at 7:16 AM, Alexander Kornienko wrote:
> 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?

Probably not.  If we do, there's a potential for collision with attributes introduced by the committee.  It doesn't seem to have any benefits except giving users a prettier syntax for writing code that is totally unportable between compilers.

> 2. what new attributes do we expect to appear in c++11 syntax?

Impossible to say;  it depends on the committee.

> 3. will they require late parsing of parameters?

Unlikely, but possible.

> 4. do we need common code for checking attribute subjects? (currently, subjects are checked in handle.*Attr functions)

I think this would be a boon regardless.


More information about the cfe-dev mailing list