[llvm-branch-commits] [llvm] [Dexter] Add at_frame_idx to check values in frames above current (PR #203505)

Orlando Cazalet-Hyams via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jun 18 08:08:44 PDT 2026


================
@@ -175,17 +182,15 @@ def get_active_wheres(where: Where, scope: Scope):
     # As we visit the script nodes in pre-order traversal, we can always assume that an expect's parent !where
     # has already been visited, and thus should have an entry in active_where_expects if it is active.
     def get_active_expects(expect: Expect, expected_value, scope: Scope):
-        if (
-            scope.where in active_where_expects
-            and active_where_expects[scope.where].frame_idx == 0
-        ):
+        if scope.where in active_where_expects and active_where_expects[
+            scope.where
+        ].frame_idx == (scope.get_desired_frame_idx() or 0):
             active_where_expects[scope.where].active_expects.append(expect)
 
     def get_active_thens(then: Then, scope: Scope):
-        if (
-            scope.where in active_where_expects
-            and active_where_expects[scope.where].frame_idx == 0
-        ):
+        if scope.where in active_where_expects and active_where_expects[
+            scope.where
+        ].frame_idx == (scope.get_desired_frame_idx() or 0):
----------------
OCHyams wrote:

little bit weird looking but I suppose it makes sense since `get_desired_frame_idx` may return None (no action required, just a note to self/others)

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


More information about the llvm-branch-commits mailing list