From: Ted Kremenek Date: Sat, 28 Mar 2009 17:33:08 +0000 (+0000) Subject: Add comparison operators for PathDiagosticLocation. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b0868d1da749f7122757016f57f9f4b62b539f4;p=clang Add comparison operators for PathDiagosticLocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67947 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/PathDiagnostic.h b/include/clang/Analysis/PathDiagnostic.h index e9ee76c030..46c27f0fee 100644 --- a/include/clang/Analysis/PathDiagnostic.h +++ b/include/clang/Analysis/PathDiagnostic.h @@ -64,6 +64,14 @@ public: PathDiagnosticLocation(SourceRange r, const SourceManager &sm) : K(Range), R(r), S(0), SM(&sm) {} + + bool operator==(const PathDiagnosticLocation &X) const { + return K == X.K && R == X.R && S == X.S; + } + + bool operator!=(const PathDiagnosticLocation &X) const { + return K != X.K || R != X.R || S != X.S; + } FullSourceLoc asLocation() const; SourceRange asRange() const;