summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTDumper.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2014-03-06 01:09:03 +0000
committerRichard Trieu <rtrieu@google.com>2014-03-06 01:09:03 +0000
commit532018f7a58f9932bea93ba367acd991edd4f83a (patch)
tree7099e8d946f92671dc2fb036d8b34ad95839cf14 /clang/lib/AST/ASTDumper.cpp
parent6b96c2447e07ed78a5ff1bd36c6df4703cf454e9 (diff)
downloadbcm5719-llvm-532018f7a58f9932bea93ba367acd991edd4f83a.tar.gz
bcm5719-llvm-532018f7a58f9932bea93ba367acd991edd4f83a.zip
Change the color of comment nodes from bright yellow to blue. Bright yellow on
a white background is difficult to read. Also include a chart showing which colors are used by which elements in the AST dump. llvm-svn: 203050
Diffstat (limited to 'clang/lib/AST/ASTDumper.cpp')
-rw-r--r--clang/lib/AST/ASTDumper.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp
index c8800356ef9..42edf5bb94d 100644
--- a/clang/lib/AST/ASTDumper.cpp
+++ b/clang/lib/AST/ASTDumper.cpp
@@ -32,12 +32,23 @@ using namespace clang::comments;
namespace {
// Colors used for various parts of the AST dump
+ // Do not use bold yellow for any text. It is hard to read on white screens.
struct TerminalColor {
raw_ostream::Colors Color;
bool Bold;
};
+ // Red - CastColor
+ // Green - TypeColor
+ // Bold Green - DeclKindNameColor, UndeserializedColor
+ // Yellow - AddressColor, LocationColor
+ // Blue - CommentColor, NullColor, IndentColor
+ // Bold Blue - AttrColor
+ // Bold Magenta - StmtColor
+ // Cyan - ValueKindColor, ObjectKindColor
+ // Bold Cyan - ValueColor, DeclNameColor
+
// Decl kind names (VarDecl, FunctionDecl, etc)
static const TerminalColor DeclKindNameColor = { raw_ostream::GREEN, true };
// Attr names (CleanupAttr, GuardedByAttr, etc)
@@ -45,7 +56,7 @@ namespace {
// Statement names (DeclStmt, ImplicitCastExpr, etc)
static const TerminalColor StmtColor = { raw_ostream::MAGENTA, true };
// Comment names (FullComment, ParagraphComment, TextComment, etc)
- static const TerminalColor CommentColor = { raw_ostream::YELLOW, true };
+ static const TerminalColor CommentColor = { raw_ostream::BLUE, false };
// Type names (int, float, etc, plus user defined types)
static const TerminalColor TypeColor = { raw_ostream::GREEN, false };
OpenPOWER on IntegriCloud