From: Argyrios Kyrtzidis Date: Sat, 20 Jun 2009 08:08:38 +0000 (+0000) Subject: Add operator '<=' for comparing SourceLocations. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06c27ee259dc8dbd20a3c4a7e7dec8de2844f895;p=clang Add operator '<=' for comparing SourceLocations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73820 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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;