aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-28 17:33:08 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-28 17:33:08 +0000
commit3b0868d1da749f7122757016f57f9f4b62b539f4 (patch)
tree57ec2933221dcd8ab12145529bb23478e5825992
parenta898283deb689b2454f3a966ef1cbf81bcb3e3e4 (diff)
Add comparison operators for PathDiagosticLocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67947 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Analysis/PathDiagnostic.h8
1 files changed, 8 insertions, 0 deletions
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;