[cfe-commits] r49074 - /cfe/trunk/lib/AST/StmtDumper.cpp

Chris Lattner sabre at nondot.org
Tue Apr 1 22:06:23 PDT 2008


Author: lattner
Date: Wed Apr  2 00:06:23 2008
New Revision: 49074

URL: http://llvm.org/viewvc/llvm-project?rev=49074&view=rev
Log:
print cvr qualifiers on simplified typedefs

Modified:
    cfe/trunk/lib/AST/StmtDumper.cpp

Modified: cfe/trunk/lib/AST/StmtDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtDumper.cpp?rev=49074&r1=49073&r2=49074&view=diff

==============================================================================
--- cfe/trunk/lib/AST/StmtDumper.cpp (original)
+++ cfe/trunk/lib/AST/StmtDumper.cpp Wed Apr  2 00:06:23 2008
@@ -88,8 +88,11 @@
 
       // If the type is directly a typedef, strip off typedefness to give at
       // least one level of concreteness.
-      if (TypedefType *TDT = dyn_cast<TypedefType>(T))
-        fprintf(F, ":'%s'", TDT->LookThroughTypedefs().getAsString().c_str());
+      if (TypedefType *TDT = dyn_cast<TypedefType>(T)) {
+        QualType Simplified = 
+          TDT->LookThroughTypedefs().getQualifiedType(T.getCVRQualifiers());
+        fprintf(F, ":'%s'", Simplified.getAsString().c_str());
+      }
     }
     void DumpStmt(const Stmt *Node) {
       Indent();





More information about the cfe-commits mailing list