summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/HTMLDiagnostics.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-11-02 00:33:58 +0000
committerTed Kremenek <kremenek@apple.com>2008-11-02 00:33:58 +0000
commit29925c8ea2366f3fadb715579696ea550a140075 (patch)
tree540d546ee846ff146b54a9e828403de4b922fb87 /clang/lib/Driver/HTMLDiagnostics.cpp
parent83eea0b17f918177c804355ba5a5a0badaa18562 (diff)
downloadbcm5719-llvm-29925c8ea2366f3fadb715579696ea550a140075.tar.gz
bcm5719-llvm-29925c8ea2366f3fadb715579696ea550a140075.zip
Fixed a horrible bug in HTMLDiagnostics.cpp where bugs referencing source ranges that occur within macros would not be emitted at all.
llvm-svn: 58550
Diffstat (limited to 'clang/lib/Driver/HTMLDiagnostics.cpp')
-rw-r--r--clang/lib/Driver/HTMLDiagnostics.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Driver/HTMLDiagnostics.cpp b/clang/lib/Driver/HTMLDiagnostics.cpp
index 9bd62815e89..72870fefe0e 100644
--- a/clang/lib/Driver/HTMLDiagnostics.cpp
+++ b/clang/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?
OpenPOWER on IntegriCloud