[llvm] [utils][filecheck-lint]: speedup filecheck_lint (PR #94191)

Benjamin Chetioui via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 03:38:59 PDT 2024


================
@@ -49,27 +49,15 @@ def test_find_potential_directives_comment_prefix(self):
         results = list(fcl.find_potential_directives(content))
         assert len(results) == 3
         pos, match = results[0]
-        assert (
-            pos.line == 1
-            and pos.start_column == len("junk; ") + 1
-            and pos.end_column == len(lines[0]) - 1
-        )
+        assert pos.as_str() == "1:7-11"
----------------
bchetioui wrote:

Would you mind deriving your string here (and below) using the previous `start_column` and `end_column` logic?
These explain the expected behaviour better, imo.

https://github.com/llvm/llvm-project/pull/94191


More information about the llvm-commits mailing list