[Lldb-commits] [lldb] [lldb] Fix `FindDirectNestedType` not working with class templates (PR #81666)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 13 14:33:40 PST 2024


================
@@ -150,6 +150,23 @@ def test(self):
         invalid_type = task_type.FindDirectNestedType(None)
         self.assertFalse(invalid_type)
 
+        # Check that FindDirectNestedType works with types from AST
+        pointer = frame0.FindVariable("pointer")
+        pointer_type = pointer.GetType()
+        self.assertTrue(pointer_type)
+        self.DebugSBType(pointer_type)
+        pointer_info_type = pointer_type.template_args[0]
----------------
Michael137 wrote:

```suggestion
        pointer_info_type = pointer_type.template_args[1]
```

then the tests works :)

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


More information about the lldb-commits mailing list