[cfe-dev] On the NNS representation for name qualifiers.
Enea Zaffanella
zaffanella at cs.unipr.it
Sat Apr 24 04:43:21 PDT 2010
Hello.
We have a question regarding the intended design of AST nodes
representing name qualifiers (i.e., those containing a
NestedNameSpecifier pointer).
Consider the following program fragment:
================
namespace N {
struct S {
struct T {};
};
}
N::S::T t;
================
where we have the name qualifier N::S:: for the type T.
In principle, this qualifier can be represented in two ways:
a) as a namespace specifier N:: followed by an (unqualified) type
specifier S::
or
b) as a single (qualified) type specifier N::S::, i.e., a single pointer
to a QualifiedNameType (which of course contains another NNS*).
Are both possibilities above actually possible in clang, or is it the
case that clang will systematically choose once and for all between
option a) and option b) ?
Thanks in advance for any clarification you can provide us.
Cheers,
Enea Zaffanella
More information about the cfe-dev
mailing list