r372325 - Reverting r372323 because it broke color tests on Linux.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 19 06:59:53 PDT 2019


Author: aaronballman
Date: Thu Sep 19 06:59:53 2019
New Revision: 372325

URL: http://llvm.org/viewvc/llvm-project?rev=372325&view=rev
Log:
Reverting r372323 because it broke color tests on Linux.

http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/17919

Modified:
    cfe/trunk/include/clang/AST/TextNodeDumper.h
    cfe/trunk/lib/AST/TextNodeDumper.cpp

Modified: cfe/trunk/include/clang/AST/TextNodeDumper.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TextNodeDumper.h?rev=372325&r1=372324&r2=372325&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/TextNodeDumper.h (original)
+++ cfe/trunk/include/clang/AST/TextNodeDumper.h Thu Sep 19 06:59:53 2019
@@ -146,6 +146,8 @@ class TextNodeDumper
 
   const comments::CommandTraits *Traits;
 
+  const ASTContext *Context;
+
   const char *getCommandName(unsigned CommandID);
 
 public:

Modified: cfe/trunk/lib/AST/TextNodeDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TextNodeDumper.cpp?rev=372325&r1=372324&r2=372325&view=diff
==============================================================================
--- cfe/trunk/lib/AST/TextNodeDumper.cpp (original)
+++ cfe/trunk/lib/AST/TextNodeDumper.cpp Thu Sep 19 06:59:53 2019
@@ -223,6 +223,7 @@ void TextNodeDumper::Visit(const Decl *D
     return;
   }
 
+  Context = &D->getASTContext();
   {
     ColorScope Color(OS, ShowColors, DeclKindNameColor);
     OS << D->getDeclKindName() << "Decl";
@@ -687,7 +688,7 @@ void TextNodeDumper::VisitConstantExpr(c
   if (Node->getResultAPValueKind() != APValue::None) {
     ColorScope Color(OS, ShowColors, ValueColor);
     OS << " ";
-    Node->getAPValueResult().dump(OS);
+    Node->getAPValueResult().printPretty(OS, *Context, Node->getType());
   }
 }
 




More information about the cfe-commits mailing list