]> granicus.if.org Git - clang/commitdiff
print cvr qualifiers on simplified typedefs
authorChris Lattner <sabre@nondot.org>
Wed, 2 Apr 2008 05:06:23 +0000 (05:06 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 2 Apr 2008 05:06:23 +0000 (05:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49074 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/StmtDumper.cpp

index d813899b530e6eb9db9d9512008edc63bbf918ec..dd7e2b320d460ce70e67851e9a4b022e9e58ca3d 100644 (file)
@@ -88,8 +88,11 @@ namespace  {
 
       // 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();