[cfe-dev] Missing method in TypeVisitor ?

Enea Zaffanella zaffanella at cs.unipr.it
Tue Feb 9 23:39:58 PST 2010


Douglas Gregor wrote:
> On Feb 9, 2010, at 9:12 AM, Enea Zaffanella wrote:
> 
>> Hello.
>> 
>> I just noticed that, in file TypeNodes.def, there is no entry for
>> 
>> DependentTypeOfExprType
>> 
>> As a consequence, there is no corresponding visiting method in 
>> TypeVisitor: I guess these nodes get visited by
>> VisitTypeOfExprType() due to public inheritance.
>> 
>> Is this what was really meant?
> 
> Yes, that is intended. DependentTypeOfExprType is meant only as a
> storage type, which retains a reference to the ASTContext so that it
> can be profiled. AST clients should just use it as a TypeOfExprType.
> 
> - Doug
> 

Now I see ... and I suppose it is the same for DependentDecltypeType.
Are there other cases?

It would be nice to improve the documentation of these classes,
e.g., by adding a sentence such as:
"AST clients should exploit inheritance and just use base class XXX."

Cheers,
Enea Zaffanella.



More information about the cfe-dev mailing list