summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-06-28 21:46:07 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-06-28 21:46:07 +0000
commit9e55d7407425524b5338229e10d5e31286ff4333 (patch)
tree22a2a6ec1d7f04dc5061ec56424b6d3d0d4b3ef0 /clang/lib/Frontend
parent1edf57639afb8cb9f306ea92b86ee39f3cd96dbe (diff)
downloadbcm5719-llvm-9e55d7407425524b5338229e10d5e31286ff4333.tar.gz
bcm5719-llvm-9e55d7407425524b5338229e10d5e31286ff4333.zip
Fix template type diffing coloring (r159216) when forcing color output to a file (not a terminal)
Reviewed (over the shoulder) by Richard Trieu. llvm-svn: 159381
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/TextDiagnostic.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Frontend/TextDiagnostic.cpp b/clang/lib/Frontend/TextDiagnostic.cpp
index 8b7332dbeb5..bd766d354c9 100644
--- a/clang/lib/Frontend/TextDiagnostic.cpp
+++ b/clang/lib/Frontend/TextDiagnostic.cpp
@@ -720,8 +720,11 @@ TextDiagnostic::printDiagnosticMessage(raw_ostream &OS,
if (Columns)
printWordWrapped(OS, Message, Columns, CurrentColumn);
- else
- OS << Message;
+ else {
+ bool Normal = true;
+ applyTemplateHighlighting(OS, Message, Normal);
+ assert(Normal && "Formatting should have returned to normal");
+ }
if (ShowColors)
OS.resetColor();
OpenPOWER on IntegriCloud