[Lldb-commits] [lldb] [LLDB] Add type casting to DIL, part 3 of 3 (PR #175061)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 6 05:37:28 PST 2026
================
@@ -233,3 +259,17 @@ def test_type_cast(self):
self.expect_var_path("((int*)arr_2d)[1]", type="int", value="2")
self.expect_var_path("((int*)arr_2d)[2]", type="int", value="3")
self.expect_var_path("((int*)arr_2d[1])[1]", type="int", value="5")
+
+ # Test casting to user-defined type with same name as variable.
+
+ self.expect_var_path("myStruct", type="myName")
+ self.expect_var_path("myName", type="int", value="37")
+
+ # Here 'myName' is treated as a variable, not a type, so '(myName)'
----------------
Michael137 wrote:
This exercises the `LookupIdentifier` short-circuit in `DILParser::ParseTypeId`? Can we also add a test that exercises the `LookupGlobalIdentifier` path?
https://github.com/llvm/llvm-project/pull/175061
More information about the lldb-commits
mailing list