summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-09-01 20:58:43 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-09-02 09:08:11 +0200
commit47579fc2405e3253c9d2664522b5f6861d7c0aa0 (patch)
tree19f12378b14a8896fe62be96f9405ddc2d2f4af5 /bin
parentf706f8d494e2527dc3f84e1595ea73a20659080c (diff)
Remove some unused includes
Change-Id: I90d4e3db3eefa41f8492cfe23c5088ea93134afc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101890 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/find-unneeded-includes6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes
index 5d3dcb6367da..90c4d89d8800 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -108,6 +108,8 @@ def ignoreRemoval(include, toAdd, absFileName, moduleRules):
return True
if include == "librevenge/librevenge.h" and "librevenge/RVNGPropertyList.h" in toAdd:
return True
+ if include == "libetonyek/libetonyek.h" and "libetonyek/EtonyekDocument.h" in toAdd:
+ return True
noRemove = (
# <https://www.openoffice.org/tools/CodingGuidelines.sxw> insists on not
@@ -262,7 +264,9 @@ def tidy(compileCommands, paths):
compileFile = pathAbs
matches = [i for i in compileCommands if i["file"] == compileFile]
if not len(matches):
- if "assumeFilename" in moduleRules.keys():
+ # Only use assume-filename for headers, so we don't try to analyze e.g. Windows-only
+ # code on Linux.
+ if "assumeFilename" in moduleRules.keys() and not path.endswith("cxx"):
assume = moduleRules["assumeFilename"]
if assume:
assumeAbs = os.path.abspath(assume)