]> granicus.if.org Git - clang/commitdiff
Add comparison operators for PathDiagosticLocation.
authorTed Kremenek <kremenek@apple.com>
Sat, 28 Mar 2009 17:33:08 +0000 (17:33 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 28 Mar 2009 17:33:08 +0000 (17:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67947 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathDiagnostic.h

index e9ee76c030b654b8e59aa072bd0f99f2a00dfb08..46c27f0fee4e1aca77fccdf66c0e14805ab4507a 100644 (file)
@@ -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;