aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-09-10 19:07:56 +0000
committerTed Kremenek <kremenek@apple.com>2012-09-10 19:07:56 +0000
commit15f9f74f0cc7c2923b1977c6d33059251e6df204 (patch)
tree84fb4ba2a9f3db9241916cee31ecee22b3142789 /lib/StaticAnalyzer/Core/PathDiagnostic.cpp
parentd727d39ca779920898d77f5dcbbb3980175594ef (diff)
Fix another case where we should be using isBeforeInTranslationUnit().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/PathDiagnostic.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/PathDiagnostic.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
index f51e16c084..98a343b79d 100644
--- a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
+++ b/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
@@ -325,8 +325,10 @@ static bool compare(const PathDiagnostic &X, const PathDiagnostic &Y) {
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();