Index: include/clang/AST/TextNodeDumper.h =================================================================== --- include/clang/AST/TextNodeDumper.h +++ 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: lib/AST/ASTDumper.cpp =================================================================== --- lib/AST/ASTDumper.cpp +++ 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: lib/AST/TextNodeDumper.cpp =================================================================== --- lib/AST/TextNodeDumper.cpp +++ 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;