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
diff --git a/clang/lib/Frontend/TextDiagnostic.cpp b/clang/lib/Frontend/TextDiagnostic.cpp
index 8b7332d..bd766d3 100644
--- a/clang/lib/Frontend/TextDiagnostic.cpp
+++ b/clang/lib/Frontend/TextDiagnostic.cpp
@@ -720,8 +720,11 @@
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();