[PATCH] D56640: NFC: Canonicalize handling of TypeLocInfo

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 14 12:17:51 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rC351115: [ASTDump] NFC: Canonicalize handling of TypeLocInfo (authored by steveire, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D56640?vs=181449&id=181626#toc

Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56640/new/

https://reviews.llvm.org/D56640

Files:
  lib/AST/ASTDumper.cpp


Index: lib/AST/ASTDumper.cpp
===================================================================
--- lib/AST/ASTDumper.cpp
+++ lib/AST/ASTDumper.cpp
@@ -122,6 +122,9 @@
     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 @@
     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 =


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56640.181626.patch
Type: text/x-patch
Size: 793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190114/f94e27f8/attachment-0001.bin>


More information about the cfe-commits mailing list