diff --git a/lldb/source/DataFormatters/VectorType.cpp b/lldb/source/DataFormatters/VectorType.cpp
--- a/lldb/source/DataFormatters/VectorType.cpp
+++ b/lldb/source/DataFormatters/VectorType.cpp
@@ -261,9 +261,10 @@
 
 bool lldb_private::formatters::VectorTypeSummaryProvider(
     ValueObject &valobj, Stream &s, const TypeSummaryOptions &) {
-  auto synthetic_children =
-      VectorTypeSyntheticFrontEndCreator(nullptr, valobj.GetSP());
-  if (!synthetic_children)
+  std::unique_ptr<SyntheticChildrenFrontEnd> synthetic_children;
+  synthetic_children.reset(
+      VectorTypeSyntheticFrontEndCreator(nullptr, valobj.GetSP()));
+  if (!synthetic_children.get())
     return false;
 
   synthetic_children->Update();
diff --git a/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp b/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
--- a/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
@@ -175,9 +175,10 @@
 
 bool lldb_private::formatters::BlockPointerSummaryProvider(
     ValueObject &valobj, Stream &s, const TypeSummaryOptions &) {
-  lldb_private::SyntheticChildrenFrontEnd *synthetic_children =
-      BlockPointerSyntheticFrontEndCreator(nullptr, valobj.GetSP());
-  if (!synthetic_children) {
+  std::unique_ptr<SyntheticChildrenFrontEnd> synthetic_children;
+  synthetic_children.reset(
+      BlockPointerSyntheticFrontEndCreator(nullptr, valobj.GetSP()));
+  if (!synthetic_children.get()) {
     return false;
   }