================
@@ -172,8 +173,15 @@ bool lldb_private::formatters::BlockPointerSummaryProvider(
 
   static const ConstString s_FuncPtr_name("__FuncPtr");
 
-  lldb::ValueObjectSP child_sp = synthetic_children->GetChildAtIndex(
-      synthetic_children->GetIndexOfChildWithName(s_FuncPtr_name));
+  auto index_or_err =
+      synthetic_children->GetIndexOfChildWithName(s_FuncPtr_name);
+
+  if (!index_or_err) {
+    return false;
----------------
Michael137 wrote:

you will need to `llvm::consumeError` here (or even log the error...search for 
`LLDB_LOG_ERROR` for some examples). Otherwise we crash

If tests pass it probably means we don't have coverage for that case

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

Reply via email to