diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes index 423aa4eae64b..1f82f2b044b1 100755 --- a/bin/find-unneeded-includes +++ b/bin/find-unneeded-includes @@ -134,6 +134,15 @@ def ignoreRemoval(include, toAdd, absFileName, moduleRules, noexclude): if include == "box2d/box2d.h" and "box2d/b2_world.h" in toAdd: return True + # Skip forward declaration of versioned namespaces + # see https://gerrit.libreoffice.org/c/core/+/72972 + # for an example of breakage caused by this + if include == "unicode/regex.h": + for item in toAdd: + match = re.search(r'namespace icu.* class RegexMatcher', item) + if match: + return True + noRemove = ( # insists on not # removing this. diff --git a/i18npool/IwyuFilter_i18npool.yaml b/i18npool/IwyuFilter_i18npool.yaml index a94ab69792ea..337c7cb60781 100644 --- a/i18npool/IwyuFilter_i18npool.yaml +++ b/i18npool/IwyuFilter_i18npool.yaml @@ -82,8 +82,6 @@ excludelist: # Base class needs complete type - com/sun/star/util/XTextSearch2.hpp - com/sun/star/lang/XServiceInfo.hpp - # contains versioned namespace so cannot forward declare - - unicode/regex.h i18npool/source/collator/collator_unicode.cxx: # Config options are used in #ifdef - config_locales.h