================ @@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True + # between columns in one-liner range + elif self.start.line == other.line == self.end.line: ---------------- Endilll wrote:
> On C++ side, in SourceLocation.h we implement operator==, operator<= both as > direct comparisons on the raw encoding (SourceLocation::getRawEncoding()). > This is not file-sensitive.* I believe raw encoding is file-sensitive. If you say that `clang_equalLocations` is file-sensitive, then `SourceLocation::operator==` is file-sensitive, too. If you look at how `CXSourceLocation` are initialized, `int_data` is raw encoding, and `ptr_data[0]` is `SourceManager` (`ptr_data[1]` seems to be a dead weight). https://github.com/llvm/llvm-project/pull/101802 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits