summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-07-05 00:41:53 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-07-05 09:07:11 +0200
commit450482220a14a5e083f11bfa1c9561994dc91ec8 (patch)
tree3b463380d151d4d55628ccdbf1dca54baee7d555 /bin
parent2f324e5305ea8d2fb309804cda2195a8e7351133 (diff)
find-unneeded-includes: stop proposing internal libstdc++ headers
They wouldn't really compile anyways and only cause unnecessary blacklist entries. Some '- memory' entries can already be removed from the blacklists. Change-Id: Iab53d5a57121f61abe935e712dc23a55390235bf Reviewed-on: https://gerrit.libreoffice.org/56979 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/find-unneeded-includes9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes
index b4a2a89e0377..2e3d15f2230c 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -53,6 +53,15 @@ def ignoreRemoval(include, toAdd, absFileName, moduleRules):
if include == k and v in toAdd:
return True
+ # Avoid proposing to use libstdc++ internal headers.
+ bits = {
+ "exception": "bits/exception.h",
+ "memory": "bits/shared_ptr.h",
+ }
+ for k, v in bits.items():
+ if include == k and v in toAdd:
+ return True
+
# Follow boost documentation.
if include == "boost/optional.hpp" and "boost/optional/optional.hpp" in toAdd:
return True