From: Steve Naroff Date: Mon, 11 Feb 2008 22:17:33 +0000 (+0000) Subject: Fix http://llvm.org/bugs/show_bug.cgi?id=2013. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58de026dd5865e478ac8f5f84be1b0169cf9c131;p=clang Fix http://llvm.org/bugs/show_bug.cgi?id=2013. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46972 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/TextDiagnosticPrinter.cpp b/Driver/TextDiagnosticPrinter.cpp index 7c87f4b78c..adfa88b855 100644 --- a/Driver/TextDiagnosticPrinter.cpp +++ b/Driver/TextDiagnosticPrinter.cpp @@ -159,7 +159,7 @@ void TextDiagnosticPrinter::HandleDiagnostic(Diagnostic &Diags, llvm::cerr << FormatDiagnostic(Diags, Level, ID, Strs, NumStrs) << "\n"; - if (!NoCaretDiagnostics && Pos.isValid() && ((LastLoc != Pos) && !Ranges)) { + if (!NoCaretDiagnostics && Pos.isValid() && ((LastLoc != Pos) || Ranges)) { // Cache the LastLoc, it allows us to omit duplicate source/caret spewage. LastLoc = Pos;