bin/find-unneeded-includes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit eeec01881aed2639741403d075ee9a74a9374c59 Author: Gabor Kelemen <[email protected]> AuthorDate: Fri Jan 23 16:53:51 2026 +0100 Commit: Gabor Kelemen <[email protected]> CommitDate: Wed Jan 28 16:52:44 2026 +0100 bin/find-unneeded-includes: more generic way to avoid versioned namespaces Spotted with include/i18nlangtag/languagetagicu.hxx: iwyu wants to replace unicode/locid.h with namespace icu_78 { class Locale; } but this is super fragile Now this works for both this and the older example: bin/find-unneeded-includes --headersfwd i18npool/inc/breakiterator_unicode.hxx include/i18nlangtag/languagetagicu.hxx should give no suggestions Change-Id: I7d534f106f45bf78f768abbb9d57389c7f413d74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198234 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes index 8822a663d2f6..fb5edfb103fd 100755 --- a/bin/find-unneeded-includes +++ b/bin/find-unneeded-includes @@ -105,9 +105,9 @@ def ignoreRemoval(include, toAdd, absFileName, moduleRules, noexclude): # 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": + if include.startswith("unicode/"): for item in toAdd: - match = re.search(r'namespace icu.* class RegexMatcher', item) + match = re.search(r'namespace icu_.*', item) if match: return True
