r351115 - [ASTDump] NFC: Canonicalize handling of TypeLocInfo
Stephen Kelly via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 14 12:13:09 PST 2019
Author: steveire
Date: Mon Jan 14 12:13:09 2019
New Revision: 351115
URL: http://llvm.org/viewvc/llvm-project?rev=351115&view=rev
Log:
[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
Modified:
cfe/trunk/lib/AST/ASTDumper.cpp
Modified: cfe/trunk/lib/AST/ASTDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTDumper.cpp?rev=351115&r1=351114&r2=351115&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTDumper.cpp (original)
+++ cfe/trunk/lib/AST/ASTDumper.cpp Mon Jan 14 12:13:09 2019
@@ -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 Ty
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 =
More information about the cfe-commits
mailing list