[cfe-dev] Again on Elaborated, QualifiedName and DependentName type nodes.

Enea Zaffanella zaffanella at cs.unipr.it
Mon May 10 09:45:53 PDT 2010


Hello.

We were reconsidering the design of C++ AST nodes
   ElaboratedType
   QualifiedNameType
   DependentNameType
In our opinion, the design of class DependentNameType, bringing
together the elaborated keyword and the name qualification, is actually 
good. In contrast, the distinction between ElaboratedType and
QualifiedNameType seems somewhat artificial.
Would it be acceptable to  collapse these two nodes in a single one, 
bringing together the corresponding info, similarly to DependentNameType?

If so, then we would try and propose an alternative patch wrt the one 
submitted here:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100503/030031.html

After that is put straight, we would like to consider the addition of 
appropriate typeloc info to the corresponding classes
   ElaboartedTypeLoc
   QualifiedNameTypeLoc
   DependentNameTypeLoc
Again, we conjecture that collapsing Elaborated and QualifiedName would 
allow for a cleaner design. However, in this case we have another doubt.
An elaborated typeloc should contain syntactic info for the underlying 
tag type node. Should we add a TypeSourceInfo* to the corresponding 
LocInfo class (as done for TypeOfTypeLoc), or should we have the 
ElaboratedTypeLoc have an _inner_ typeloc (as done for pointer and array 
typelocs)?

Thanks in advance for the clarifications,
Enea.



More information about the cfe-dev mailing list