diff options
Diffstat (limited to 'include/clang/Basic/SourceLocation.h')
-rw-r--r-- | include/clang/Basic/SourceLocation.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h index ba0bb6faac..3ed26fcbb2 100644 --- a/include/clang/Basic/SourceLocation.h +++ b/include/clang/Basic/SourceLocation.h @@ -169,6 +169,14 @@ public: bool isValid() const { return B.isValid() && E.isValid(); } + bool operator==(const SourceRange &X) const { + return B == X.B && E == X.E; + } + + bool operator!=(const SourceRange &X) const { + return B != X.B || E != X.E; + } + /// Emit - Emit this SourceRange object to Bitcode. void Emit(llvm::Serializer& S) const; |