Skip to content

Commit fcc0241

Browse files
kastiglioneagozillon
authored andcommitted
[lldb] Cleanup regex in libcxx formatters (NFC) (llvm#80618)
I noticed a number of regex for libcxx formatters use an unnecessary regex grouping. This change removes those parentheses.
1 parent 836a58a commit fcc0241

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
788788
cpp_category_sp,
789789
lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEndCreator,
790790
"libc++ std::unordered containers synthetic children",
791-
"^(std::__[[:alnum:]]+::)unordered_(multi)?(map|set)<.+> >$",
791+
"^std::__[[:alnum:]]+::unordered_(multi)?(map|set)<.+> >$",
792792
stl_synth_flags, true);
793793
AddCXXSynthetic(
794794
cpp_category_sp,
@@ -824,16 +824,16 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
824824
"^std::__[[:alnum:]]+::ranges::ref_view<.+>$", stl_deref_flags, true);
825825

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

832832
AddCXXSynthetic(
833833
cpp_category_sp,
834834
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEndCreator,
835-
"shared_ptr synthetic children",
836-
"^(std::__[[:alnum:]]+::)shared_ptr<.+>$", stl_synth_flags, true);
835+
"shared_ptr synthetic children", "^std::__[[:alnum:]]+::shared_ptr<.+>$",
836+
stl_synth_flags, true);
837837

838838
static constexpr const char *const libcxx_std_unique_ptr_regex =
839839
"^std::__[[:alnum:]]+::unique_ptr<.+>$";
@@ -846,7 +846,7 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
846846
AddCXXSynthetic(
847847
cpp_category_sp,
848848
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEndCreator,
849-
"weak_ptr synthetic children", "^(std::__[[:alnum:]]+::)weak_ptr<.+>$",
849+
"weak_ptr synthetic children", "^std::__[[:alnum:]]+::weak_ptr<.+>$",
850850
stl_synth_flags, true);
851851
AddCXXSummary(cpp_category_sp,
852852
lldb_private::formatters::LibcxxFunctionSummaryProvider,
@@ -910,7 +910,7 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
910910
AddCXXSummary(cpp_category_sp,
911911
lldb_private::formatters::LibcxxContainerSummaryProvider,
912912
"libc++ std::unordered containers summary provider",
913-
"^(std::__[[:alnum:]]+::)unordered_(multi)?(map|set)<.+> >$",
913+
"^std::__[[:alnum:]]+::unordered_(multi)?(map|set)<.+> >$",
914914
stl_summary_flags, true);
915915
AddCXXSummary(cpp_category_sp, LibcxxContainerSummaryProvider,
916916
"libc++ std::tuple summary provider",

0 commit comments

Comments
 (0)