[cfe-commits] r163533 - /cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
Ted Kremenek
kremenek at apple.com
Mon Sep 10 12:07:56 PDT 2012
Author: kremenek
Date: Mon Sep 10 14:07:56 2012
New Revision: 163533
URL: http://llvm.org/viewvc/llvm-project?rev=163533&view=rev
Log:
Fix another case where we should be using isBeforeInTranslationUnit().
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp?rev=163533&r1=163532&r2=163533&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp Mon Sep 10 14:07:56 2012
@@ -325,8 +325,10 @@
return false;
SourceLocation XDL = XD->getLocation();
SourceLocation YDL = YD->getLocation();
- if (XDL != YDL)
- return XDL < YDL;
+ if (XDL != YDL) {
+ const SourceManager &SM = XL.getManager();
+ return SM.isBeforeInTranslationUnit(XDL, YDL);
+ }
}
PathDiagnostic::meta_iterator XI = X.meta_begin(), XE = X.meta_end();
PathDiagnostic::meta_iterator YI = Y.meta_begin(), YE = Y.meta_end();
More information about the cfe-commits
mailing list