[cfe-dev] A small proposal about TagType's and source ranges
Abramo Bagnara
abramo.bagnara at gmail.com
Sat Mar 12 08:54:34 PST 2011
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).
This permit to avoid a lot of elaborated types in C++, to uniform C and
C++ and to permit to have proper source ranges on both C and C++ (in C
this is currently impossible).
Personally I don't see any drawback and the needed changes are trivial,
however I'd like to hear core developers opinion before to proceed.
More information about the cfe-dev
mailing list