[cfe-dev] Access specifiers and anonymous unions
Abramo Bagnara
abramo.bagnara at gmail.com
Mon May 31 07:21:50 PDT 2010
Il 28/05/2010 19:53, John McCall ha scritto:
>>
>> To represent correctly the above we might decide to have a node for
>> access specifiers at the same level of other decls.
>
> Yes, I've been wanting something like this for some time.
Would it be OK if we derive from Decl a new class modeling syntactic
access specifiers occurring in the list of member specifiers of a C++
class definition?
What about the name AccessSpecDecl ?
Deriving from Decl already provides space for storing the access
specifier (cannot be AS_none) and the corresponding source location.
While at it, should we also provide a source location for the ':' ?
Am I right if I say that all code visiting CXXRecordDecl as a
declaration context will automatically ignore this new class (which is
actually a good thing)?
We should only consider them in dumping/pretty printing code.
Cheers,
Abramo
More information about the cfe-dev
mailing list