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

Benjamin Chetioui via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 09:10:39 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:

Sorry---I was not clear. I meant to ask whether `7` could be assigned from `len("junk// ") + 1` and `11` could be assigned from `len(lines[1]) - 1`.

I think this makes the expected behaviour clearer.

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


More information about the llvm-commits mailing list