diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-19 07:44:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-19 07:44:08 +0000 |
commit | aa5bf2e8dc01f9835efef76222dc440a5c18b160 (patch) | |
tree | 4c4620f10a27e97667ff8c086564706b6387353b /lib/Frontend/TextDiagnosticPrinter.cpp | |
parent | aa269c2e9c242a2fdf1f47ea400f58823ae9e395 (diff) |
implement compiler support for -fno-diagnostics-fixit-info,
rdar://6805442
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/TextDiagnosticPrinter.cpp')
-rw-r--r-- | lib/Frontend/TextDiagnosticPrinter.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Frontend/TextDiagnosticPrinter.cpp b/lib/Frontend/TextDiagnosticPrinter.cpp index 9583780870..7d3c4c23ff 100644 --- a/lib/Frontend/TextDiagnosticPrinter.cpp +++ b/lib/Frontend/TextDiagnosticPrinter.cpp @@ -207,10 +207,9 @@ void TextDiagnosticPrinter::EmitCaretDiagnostic(SourceLocation Loc, OS << SourceLine << '\n'; OS << CaretLine << '\n'; - if (NumHints) { + if (NumHints && PrintFixItInfo) { std::string InsertionLine; - for (const CodeModificationHint *Hint = Hints, - *LastHint = Hints + NumHints; + for (const CodeModificationHint *Hint = Hints, *LastHint = Hints + NumHints; Hint != LastHint; ++Hint) { if (Hint->InsertionLoc.isValid()) { // We have an insertion hint. Determine whether the inserted |