Author: nerix
Date: 2025-07-11T13:06:17+01:00
New Revision: 539991e33f1df194b6ca00039a1bab04b045f47b

URL: 
https://github.com/llvm/llvm-project/commit/539991e33f1df194b6ca00039a1bab04b045f47b
DIFF: 
https://github.com/llvm/llvm-project/commit/539991e33f1df194b6ca00039a1bab04b045f47b.diff

LOG: [LLDB] Use non synthetic value for MSVC smart ptr check (#148176)

I forgot to use the non-synthetic value to check for the `_Ptr` member.

Fixes the test failure from #147575.

---------

Co-authored-by: Michael Buch <michaelbuc...@gmail.com>

Added: 
    

Modified: 
    lldb/source/Plugins/Language/CPlusPlus/MsvcStlSmartPointer.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Language/CPlusPlus/MsvcStlSmartPointer.cpp 
b/lldb/source/Plugins/Language/CPlusPlus/MsvcStlSmartPointer.cpp
index 4a51879863f17..b1aecc4b6611a 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/MsvcStlSmartPointer.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/MsvcStlSmartPointer.cpp
@@ -15,7 +15,10 @@
 using namespace lldb;
 
 bool lldb_private::formatters::IsMsvcStlSmartPointer(ValueObject &valobj) {
-  return valobj.GetChildMemberWithName("_Ptr") != nullptr;
+  if (auto valobj_sp = valobj.GetNonSyntheticValue())
+    return valobj_sp->GetChildMemberWithName("_Ptr") != nullptr;
+
+  return false;
 }
 
 bool lldb_private::formatters::MsvcStlSmartPointerSummaryProvider(


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to