[cfe-commits] r67947 - /cfe/trunk/include/clang/Analysis/PathDiagnostic.h

Ted Kremenek kremenek at apple.com
Sat Mar 28 10:33:08 PDT 2009


Author: kremenek
Date: Sat Mar 28 12:33:08 2009
New Revision: 67947

URL: http://llvm.org/viewvc/llvm-project?rev=67947&view=rev
Log:
Add comparison operators for PathDiagosticLocation.

Modified:
    cfe/trunk/include/clang/Analysis/PathDiagnostic.h

Modified: cfe/trunk/include/clang/Analysis/PathDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathDiagnostic.h?rev=67947&r1=67946&r2=67947&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathDiagnostic.h (original)
+++ cfe/trunk/include/clang/Analysis/PathDiagnostic.h Sat Mar 28 12:33:08 2009
@@ -64,6 +64,14 @@
   
   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;





More information about the cfe-commits mailing list