summaryrefslogtreecommitdiffstats
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
commita0fa5d656412fa8af4898eccca30fc7c2de4fa8f (patch)
tree59b8f5efc44315633b906bddf3d101c989b0bf96
parent7307fea911454c13ec67cbc265d3d909d38effbc (diff)
downloadbcm5719-llvm-a0fa5d656412fa8af4898eccca30fc7c2de4fa8f.tar.gz
bcm5719-llvm-a0fa5d656412fa8af4898eccca30fc7c2de4fa8f.zip
Fix another case where we should be using isBeforeInTranslationUnit().
llvm-svn: 163533
-rw-r--r--clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
index f51e16c0849..98a343b79d7 100644
--- a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud