Skip to content

Commit

Permalink
[ASTDump] NFC: Canonicalize handling of TypeLocInfo
Browse files Browse the repository at this point in the history
Summary: No need to avoid the Visit method.

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

llvm-svn: 351115
  • Loading branch information
steveire committed Jan 14, 2019
1 parent 449fa76 commit bc2438d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions clang/lib/AST/ASTDumper.cpp
Expand Up @@ -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());
}
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit bc2438d

Please sign in to comment.