From 3b0868d1da749f7122757016f57f9f4b62b539f4 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Sat, 28 Mar 2009 17:33:08 +0000 Subject: [PATCH] Add comparison operators for PathDiagosticLocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67947 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Analysis/PathDiagnostic.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.50.1