From 450482220a14a5e083f11bfa1c9561994dc91ec8 Mon Sep 17 00:00:00 2001 From: Gabor Kelemen Date: Thu, 5 Jul 2018 00:41:53 +0200 Subject: 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 --- bin/find-unneeded-includes | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bin/find-unneeded-includes') 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 -- cgit