[cfe-commits] r58550 - /cfe/trunk/lib/Driver/HTMLDiagnostics.cpp
Ted Kremenek
kremenek at apple.com
Sat Nov 1 17:34:05 PDT 2008
Author: kremenek
Date: Sat Nov 1 19:33:58 2008
New Revision: 58550
URL: http://llvm.org/viewvc/llvm-project?rev=58550&view=rev
Log:
Fixed a horrible bug in HTMLDiagnostics.cpp where bugs referencing source ranges that occur within macros would not be emitted at all.
Modified:
cfe/trunk/lib/Driver/HTMLDiagnostics.cpp
Modified: cfe/trunk/lib/Driver/HTMLDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/HTMLDiagnostics.cpp?rev=58550&r1=58549&r2=58550&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/HTMLDiagnostics.cpp (original)
+++ cfe/trunk/lib/Driver/HTMLDiagnostics.cpp Sat Nov 1 19:33:58 2008
@@ -132,7 +132,7 @@
// 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 @@
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 @@
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?
More information about the cfe-commits
mailing list