[cfe-dev] QualifiedTemplateName as inner type of an ElaboratedType ?

Abramo Bagnara abramo.bagnara at gmail.com
Sat Jun 5 23:41:11 PDT 2010


Il 05/06/2010 22:49, John McCall ha scritto:
> On Jun 5, 2010, at 3:36 AM, Enea Zaffanella wrote:
>> Should clang get rid of the redundant qualification in the 
>> ElaboratedType (and DependentNameType) whenever the inner type already 
>> has name qualification info (i.e., a QualifiedTemplateName or a 
>> DependentTemplateName and maybe others)?
>>
>> Or should clang rather insist on a stronger (and simpler?) design where 
>> a TemplateName is *never* qualified, i.e., any qualifier should be 
>> encoded as an external ElaboratedType (or DependentNameType) wrapper?
> 
> This would be better;  I don't think we really get anything out of the current
> redundancy in TemplateName.  We might need a
> DependentTemplateSpecializationType first, though.

I'd like to make the following proposal to rationalize this area of type
system:

- introduce UnresolvedNameType (it contains only an IdentifierInfo*)

- introduce UnresolvedTemplateSpecializationType (IdentifierInfo* +
template arguments)

- (optional) unify DependentNameType to ElaboratedType: an
ElaboratedType is a dependent name type (in the meaning of removed
DependentNameType) if its inner type is Unresolved




More information about the cfe-dev mailing list