From e4fac1ebbdc73e72fb79ab5d6743e0cc49b558d1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 12 Dec 2019 17:13:49 +0100 Subject: Enable -Wdeprecated-copy-dtor where available We already get -Wdeprecated-copy (warning about implicitly defined copy functions that will in the future be deleted because other user-provided copy functions exist) automatically through -Wextra, where available. -Wdeprecated-copy-dtor (warning about implicitly defined copy functions that will in the future be deleted because of a user-provided dtor) is split off into its own warning excluded from -Wextra for somewhat unclear reasons, see the discussion at "-Wdeprecated-copy is draconian and shouldn't be in -Wall". But -Wdeprecated-copy-dtor has been useful in finding issues (esp. the Clang 10 trunk version, which, unlike the GCC 9 version, also finds copy functions that are implicitly defined because they are used from template instantiations), see 3e59716375a240576fd6d8759b32b4319506ed70 "Prevent BroadcastRecalcOnRefMoveHandler copies" and 4f98cd0f9ce9c2a331a5d34b3ef9d18f9bb6b235 "ScShapeChild has broken copy functions". We need to disable -Wdeprecated-copy-dtor in files included from external/boost, and in two compilerplugin/clang/test/ files. Change-Id: I74b159c3a046e23661473ddbfe53c92c4136a9db Reviewed-on: https://gerrit.libreoffice.org/85073 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- bin/gen-boost-headers | 1 + 1 file changed, 1 insertion(+) (limited to 'bin') diff --git a/bin/gen-boost-headers b/bin/gen-boost-headers index 478e9c8f7ee0..7397ecad47d1 100755 --- a/bin/gen-boost-headers +++ b/bin/gen-boost-headers @@ -40,6 +40,7 @@ cat <(cd ${SRCDIR} && git grep -h '^# *include') \ #pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wdeprecated-copy" +#pragma GCC diagnostic ignored "-Wdeprecated-copy-dtor" #pragma GCC diagnostic ignored "-Wextra" #pragma GCC diagnostic ignored "-Wignored-qualifiers" #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" -- cgit