================
@@ -3015,11 +3017,12 @@ llvm::Expected<lldb::ValueObjectSP> 
ValueObject::CastDerivedToBaseType(
 
   lldb::TargetSP target = GetTargetSP();
   // The `value` can be a pointer, but GetChildAtIndex works for pointers too.
-  lldb::ValueObjectSP inner_value;
+  lldb::ValueObjectSP inner_value = GetSP();
 
   for (const uint32_t i : base_type_indices)
     // Force static value, otherwise we can end up with the "real" type.
-    inner_value = GetChildAtIndex(i, /*can_create_synthetic*/ false);
----------------
cmtice wrote:

Done.

https://github.com/llvm/llvm-project/pull/87197
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to