================ @@ -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:
How about we follow the `SourceRange::fullyContains`? In other words, expose `SourceLocation::operator<` to enable ordering of source locations, and leverage that in `SourceRange.__contains__`. I expect the latter to become much simpler. 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