diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-06-20 08:08:38 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-06-20 08:08:38 +0000 |
commit | 06c27ee259dc8dbd20a3c4a7e7dec8de2844f895 (patch) | |
tree | 737424c6ec7978e0709bc74fed9913593751f140 /include/clang/Basic/SourceLocation.h | |
parent | 0853a02c3b04d96a3c432b883e403175c954cd81 (diff) |
Add operator '<=' for comparing SourceLocations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73820 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceLocation.h')
-rw-r--r-- | include/clang/Basic/SourceLocation.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h index 2405c2fe7d..7d78087d9d 100644 --- a/include/clang/Basic/SourceLocation.h +++ b/include/clang/Basic/SourceLocation.h @@ -145,6 +145,10 @@ inline bool operator<(const SourceLocation &LHS, const SourceLocation &RHS) { return LHS.getRawEncoding() < RHS.getRawEncoding(); } +inline bool operator<=(const SourceLocation &LHS, const SourceLocation &RHS) { + return LHS.getRawEncoding() <= RHS.getRawEncoding(); +} + /// SourceRange - a trival tuple used to represent a source range. class SourceRange { SourceLocation B; |