diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-11-02 00:33:58 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-11-02 00:33:58 +0000 |
commit | 583e898efa890be581606f8162caac126d4a7106 (patch) | |
tree | 4f80fe479bd13e0acb006287d92e484c2593b7e4 /lib/Driver/HTMLDiagnostics.cpp | |
parent | 45d196b8387dcefc4df26cda114fa34c6528e928 (diff) |
Fixed a horrible bug in HTMLDiagnostics.cpp where bugs referencing source ranges that occur within macros would not be emitted at all.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/HTMLDiagnostics.cpp')
-rw-r--r-- | lib/Driver/HTMLDiagnostics.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Driver/HTMLDiagnostics.cpp b/lib/Driver/HTMLDiagnostics.cpp index 9bd62815e8..72870fefe0 100644 --- a/lib/Driver/HTMLDiagnostics.cpp +++ b/lib/Driver/HTMLDiagnostics.cpp @@ -132,7 +132,7 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D) { // Verify that the entire path is from the same FileID. for (PathDiagnostic::const_iterator I=D.begin(), E=D.end(); I != E; ++I) { - FullSourceLoc L = I->getLocation(); + FullSourceLoc L = I->getLocation().getLogicalLoc(); if (!L.isFileID()) return; // FIXME: Emit a warning? @@ -148,7 +148,7 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D) { for (PathDiagnosticPiece::range_iterator RI=I->ranges_begin(), RE=I->ranges_end(); RI!=RE; ++RI) { - SourceLocation L = RI->getBegin(); + SourceLocation L = SMgr.getLogicalLoc(RI->getBegin()); if (!L.isFileID()) return; // FIXME: Emit a warning? @@ -156,7 +156,7 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D) { if (SMgr.getCanonicalFileID(L) != FileID) return; // FIXME: Emit a warning? - L = RI->getEnd(); + L = SMgr.getLogicalLoc(RI->getEnd()); if (!L.isFileID()) return; // FIXME: Emit a warning? |