[ASTDump] NFC: Canonicalize handling of TypeLocInfo

Summary: No need to avoid the Visit method.

Reviewers: aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D56640

llvm-svn: 351115
This commit is contained in:
Stephen Kelly 2019-01-14 20:13:09 +00:00
parent 449fa76d05
commit bc2438d014
1 changed files with 3 additions and 4 deletions

View File

@ -122,6 +122,9 @@ namespace {
void VisitComplexType(const ComplexType *T) {
dumpTypeAsChild(T->getElementType());
}
void VisitLocInfoType(const LocInfoType *T) {
dumpTypeAsChild(T->getTypeSourceInfo()->getType());
}
void VisitPointerType(const PointerType *T) {
dumpTypeAsChild(T->getPointeeType());
}
@ -433,10 +436,6 @@ void ASTDumper::dumpTypeAsChild(const Type *T) {
NodeDumper.Visit(T);
if (!T)
return;
if (const LocInfoType *LIT = llvm::dyn_cast<LocInfoType>(T)) {
dumpTypeAsChild(LIT->getTypeSourceInfo()->getType());
return;
}
TypeVisitor<ASTDumper>::Visit(T);
QualType SingleStepDesugar =