diff options
Diffstat (limited to 'clang/lib/StaticAnalyzer')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp | 6 | 
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(); | 

