[llvm-branch-commits] [llvm] [Dexter] Add !type and !type/all nodes to test variable types (PR #204159)

Stephen Tozer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jun 29 03:59:08 PDT 2026


================
@@ -257,13 +258,15 @@ def collect_expects_to_rewrite(
         ):
             if expected_value is not None:
                 return
-            if isinstance(expect, ValueAll):
+            if expect.get_watched_scope() is not None:
----------------
SLTozer wrote:

I think the two kinds of checks (`get_watched_X() is not None` vs `isinstance`) are rather redundant with each other - in practice the one that I selected in most cases depends on whether we're only reading the `get_watched` value, or reading other fields of the class. I prefer the `get_watched` approach when possible, since it requires less manual updating as we extend or add classes, but consistency is also a virtue, so I can update it to be an `isinstance` check - WDYT?

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


More information about the llvm-branch-commits mailing list