Skip to content

Commit 539991e

Browse files
NerixyzMichael137
andauthored
[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 <michaelbuch12@gmail.com>
1 parent 6bcc38e commit 539991e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
using namespace lldb;
1616

1717
bool lldb_private::formatters::IsMsvcStlSmartPointer(ValueObject &valobj) {
18-
return valobj.GetChildMemberWithName("_Ptr") != nullptr;
18+
if (auto valobj_sp = valobj.GetNonSyntheticValue())
19+
return valobj_sp->GetChildMemberWithName("_Ptr") != nullptr;
20+
21+
return false;
1922
}
2023

2124
bool lldb_private::formatters::MsvcStlSmartPointerSummaryProvider(

0 commit comments

Comments
 (0)