[cfe-dev] A small proposal about TagType's and source ranges

John McCall rjmccall at apple.com
Sat Mar 12 11:10:03 PST 2011


On Mar 12, 2011, at 8:54 AM, Abramo Bagnara wrote:

> 
> We are struggling to fix lack of proper source location range for
> TagType's due to missing setting of both source location for tag keyword
> and name.
> 
> We'd like to propose the following simplification of current approach to
> tag types and elaborated types storing:
> 
> Currently clang uses (only in C++) an ElaboratedType whenever the type
> has an explicit class/struct/union/enum keyword *or* a name qualifier.
> 
> We propose to use an ElaboratedType *only* whenever there is a name
> qualifier and to add to TagTypeLoc a (possibly invalid) tag keyword
> location (removing the one now available in ElaboratedTypeLoc).

How would we represent "struct A::B" in C++?

It's also important to distinguish between A and struct A in C++.  If we don't have an elaborated type node, what remembers this distinction?

John.



More information about the cfe-dev mailing list