[cfe-commits] [PATCH] Addition of color to -ast-dump
Philip Craig
philipjcraig at gmail.com
Wed Jan 23 03:12:37 PST 2013
================
Comment at: include/clang/AST/DeclBase.h:853
@@ -852,2 +852,3 @@
// Debuggers don't usually respect default arguments.
LLVM_ATTRIBUTE_USED void dump() const;
+ // Same as dump(), but forces color printing.
----------------
Saleem Abdulrasool wrote:
> Why not make colour a default valued parameter for dump? This would avoid duplication of the method as well as reduce the interface.
As the comment states, debuggers don't handle default arguments.
================
Comment at: lib/AST/ASTDumper.cpp:113
@@ -58,1 +112,3 @@
+ LastLocFilename(""), LastLocLine(~0U),
+ ShowColors(SM && SM->getDiagnostics().getShowColors()) { }
----------------
I used OS.has_colors() in lib/Frontend/ASTConsumers.cpp. We probably should be consistent between these. I don't know which is better.
http://llvm-reviews.chandlerc.com/D291
More information about the cfe-commits
mailing list