Skip to content

Commit e5d3d28

Browse files
committed
[lldb] add review changes
1 parent 69bd3bc commit e5d3d28

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1700,9 +1700,11 @@ static void LoadCommonStlFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
17001700
},
17011701
"MSVC STL/libstdc++ std::wstring summary provider"));
17021702

1703+
// NOTE: it is loaded as a common formatter because the libc++ version is not
1704+
// in the `__1` namespace, hence we need to dispatch based on the class layout.
17031705
AddCXXSynthetic(cpp_category_sp,
17041706
GenericInitializerListSyntheticFrontEndCreator,
1705-
"libc++/libstdc++ std::initializer_list synthetic children",
1707+
"std::initializer_list synthetic children",
17061708
"^std::initializer_list<.+>$", stl_synth_flags, true);
17071709

17081710
stl_summary_flags.SetDontShowChildren(false);

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializer_list/TestDataFormatterStdInitializerList.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ def do_test(self):
2828
substrs=["stopped", "stop reason = breakpoint"],
2929
)
3030

31-
self.expect("frame variable ili", substrs=["[1] = 2", "[4] = 5"])
31+
self.expect(
32+
"frame variable ili", substrs=["ili = size=5", "[1] = 2", "[4] = 5"]
33+
)
3234
self.expect(
3335
"frame variable ils",
34-
substrs=['[4] = "surprise it is a long string!! yay!!"'],
36+
substrs=["ils = size=5","[0] = 1", '[4] = "surprise it is a long string!! yay!!"'],
3537
)
3638

3739
@add_test_categories(["libc++"])

0 commit comments

Comments
 (0)