diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-06-28 21:46:07 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-06-28 21:46:07 +0000 |
commit | 50badd523b9b90c0731423d002b13a00bf754036 (patch) | |
tree | e37e82b05df63f0510d32faadee88a87e8bfc163 /lib/Frontend/TextDiagnostic.cpp | |
parent | 0963017dcbc32176c79a251c3ab23bc35ac784e5 (diff) |
Fix template type diffing coloring (r159216) when forcing color output to a file (not a terminal)
Reviewed (over the shoulder) by Richard Trieu.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/TextDiagnostic.cpp')
-rw-r--r-- | lib/Frontend/TextDiagnostic.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Frontend/TextDiagnostic.cpp b/lib/Frontend/TextDiagnostic.cpp index 8b7332dbeb..bd766d354c 100644 --- a/lib/Frontend/TextDiagnostic.cpp +++ b/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(); |