Index: cfe/trunk/include/clang/AST/TextNodeDumper.h =================================================================== --- cfe/trunk/include/clang/AST/TextNodeDumper.h +++ cfe/trunk/include/clang/AST/TextNodeDumper.h @@ -161,6 +161,8 @@ void Visit(const Type *T); + void Visit(QualType T); + void dumpPointer(const void *Ptr); void dumpLocation(SourceLocation Loc); void dumpSourceRange(SourceRange R); Index: cfe/trunk/lib/AST/ASTDumper.cpp =================================================================== --- cfe/trunk/lib/AST/ASTDumper.cpp +++ cfe/trunk/lib/AST/ASTDumper.cpp @@ -422,11 +422,7 @@ return dumpTypeAsChild(SQT.Ty); dumpChild([=] { - OS << "QualType"; - NodeDumper.dumpPointer(T.getAsOpaquePtr()); - OS << " "; - NodeDumper.dumpBareType(T, false); - OS << " " << T.split().Quals.getAsString(); + NodeDumper.Visit(T); dumpTypeAsChild(T.split().Ty); }); } Index: cfe/trunk/lib/AST/TextNodeDumper.cpp =================================================================== --- cfe/trunk/lib/AST/TextNodeDumper.cpp +++ cfe/trunk/lib/AST/TextNodeDumper.cpp @@ -172,6 +172,14 @@ OS << " imported"; } +void TextNodeDumper::Visit(QualType T) { + OS << "QualType"; + dumpPointer(T.getAsOpaquePtr()); + OS << " "; + dumpBareType(T, false); + OS << " " << T.split().Quals.getAsString(); +} + void TextNodeDumper::dumpPointer(const void *Ptr) { ColorScope Color(OS, ShowColors, AddressColor); OS << ' ' << Ptr;