Missing method in TypeVisitor ?

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?

Cheers,
Enea Zaffanella.

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

Douglas Gregor 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.

Douglas Gregor 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?

No, I don't think so.

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."

Done in r95989. Thanks!

  - Doug