Reverting r372323 because it broke color tests on Linux.

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

llvm-svn: 372325
This commit is contained in:
Aaron Ballman 2019-09-19 13:59:53 +00:00
parent 7592e3a81f
commit ed9104c3f8
2 changed files with 4 additions and 1 deletions

View File

@ -146,6 +146,8 @@ class TextNodeDumper
const comments::CommandTraits *Traits;
const ASTContext *Context;
const char *getCommandName(unsigned CommandID);
public:

View File

@ -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(const ConstantExpr *Node) {
if (Node->getResultAPValueKind() != APValue::None) {
ColorScope Color(OS, ShowColors, ValueColor);
OS << " ";
Node->getAPValueResult().dump(OS);
Node->getAPValueResult().printPretty(OS, *Context, Node->getType());
}
}