[llvm] [Dexter] Add label nodes for line references (PR #202544)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 02:40:59 PDT 2026


================
@@ -130,6 +208,26 @@ def root_wheres(self) -> Set[Where]:
     def dump(self) -> str:
         return yaml.dump(self.script_obj)
 
+    def gather_labels(self):
+        """Pre-gather labels for all !where nodes with `lines` entries."""
+        assert self.root_scope.file is not None
+        add_labels = lambda file: self.label_dict.set_labels_from_file(
+            self.context, file, str(self.base_dir)
+        )
+
+        def collect_file(where: Where, scope: Scope):
+            # If we have !where nodes that check lines without an explicit file, we default to the test file.
----------------
OCHyams wrote:

Why not default to the parent-node file (which I assume may be the test file if it doesn't specify one)? 

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


More information about the llvm-commits mailing list