[cfe-commits] r73820 - /cfe/trunk/include/clang/Basic/SourceLocation.h
Argiris Kirtzidis
akyrtzi at gmail.com
Sat Jun 20 01:08:38 PDT 2009
Author: akirtzidis
Date: Sat Jun 20 03:08:38 2009
New Revision: 73820
URL: http://llvm.org/viewvc/llvm-project?rev=73820&view=rev
Log:
Add operator '<=' for comparing SourceLocations.
Modified:
cfe/trunk/include/clang/Basic/SourceLocation.h
Modified: cfe/trunk/include/clang/Basic/SourceLocation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceLocation.h?rev=73820&r1=73819&r2=73820&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceLocation.h (original)
+++ cfe/trunk/include/clang/Basic/SourceLocation.h Sat Jun 20 03:08:38 2009
@@ -145,6 +145,10 @@
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;
More information about the cfe-commits
mailing list