bin/find-unneeded-includes: skip versioned namespace
This has led to
commit 62a9df7473
"find-unneded-includes: avoid replacing includes with forward-declarations"
now the replacement of unicode/regex.h with a versioned namespace is not suggested
Change-Id: Ic30954561739591bd483382ed75a56f5901ac993
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192428
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
committed by
Miklos Vajna
parent
1e89ae7b07
commit
85148426ab
@@ -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 = (
|
||||
# <https://www.openoffice.org/tools/CodingGuidelines.sxw> insists on not
|
||||
# removing this.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user