Skip to content

[lldb] Cleanup regex in libcxx formatters (NFC) #80618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
cpp_category_sp,
lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEndCreator,
"libc++ std::unordered containers synthetic children",
"^(std::__[[:alnum:]]+::)unordered_(multi)?(map|set)<.+> >$",
"^std::__[[:alnum:]]+::unordered_(multi)?(map|set)<.+> >$",
stl_synth_flags, true);
AddCXXSynthetic(
cpp_category_sp,
Expand Down Expand Up @@ -824,16 +824,16 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
"^std::__[[:alnum:]]+::ranges::ref_view<.+>$", stl_deref_flags, true);

cpp_category_sp->AddTypeSynthetic(
"^(std::__[[:alnum:]]+::)deque<.+>$", eFormatterMatchRegex,
"^std::__[[:alnum:]]+::deque<.+>$", eFormatterMatchRegex,
SyntheticChildrenSP(new ScriptedSyntheticChildren(
stl_synth_flags,
"lldb.formatters.cpp.libcxx.stddeque_SynthProvider")));

AddCXXSynthetic(
cpp_category_sp,
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEndCreator,
"shared_ptr synthetic children",
"^(std::__[[:alnum:]]+::)shared_ptr<.+>$", stl_synth_flags, true);
"shared_ptr synthetic children", "^std::__[[:alnum:]]+::shared_ptr<.+>$",
stl_synth_flags, true);

static constexpr const char *const libcxx_std_unique_ptr_regex =
"^std::__[[:alnum:]]+::unique_ptr<.+>$";
Expand All @@ -846,7 +846,7 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
AddCXXSynthetic(
cpp_category_sp,
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEndCreator,
"weak_ptr synthetic children", "^(std::__[[:alnum:]]+::)weak_ptr<.+>$",
"weak_ptr synthetic children", "^std::__[[:alnum:]]+::weak_ptr<.+>$",
stl_synth_flags, true);
AddCXXSummary(cpp_category_sp,
lldb_private::formatters::LibcxxFunctionSummaryProvider,
Expand Down Expand Up @@ -910,7 +910,7 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
AddCXXSummary(cpp_category_sp,
lldb_private::formatters::LibcxxContainerSummaryProvider,
"libc++ std::unordered containers summary provider",
"^(std::__[[:alnum:]]+::)unordered_(multi)?(map|set)<.+> >$",
"^std::__[[:alnum:]]+::unordered_(multi)?(map|set)<.+> >$",
stl_summary_flags, true);
AddCXXSummary(cpp_category_sp, LibcxxContainerSummaryProvider,
"libc++ std::tuple summary provider",
Expand Down