Drop redundant -Wnon-virtual-dtor

Desktop / LibreOffice - Stephan Bergmann [redhat.com] - 24 November 2022 09:38 UTC

Inspired by "[PATCH] doc: -Wdelete-non-virtual-dtor supersedes -Wnon-virtual-dtor", drop explicitly enabling -Wnon-virtual-dtor in favor of -Wdelete-non-virtual-dtor, which is already enabled by -Wall.

(-Wdelete-non-virtual-dtor first appeared in Clang 3.0, "Add new warning that warns when invoking 'delete' on a polymorphic, non-final, class without a virtual destructor", and GCC 4.7, "invoke.texi: Document -Wdelete-non-virtual-dtor. [...]")

Dropping the explicit setting of -Wnon-virtual-dtor (and nowhere setting it implicitly via -Weffc++) means we can get rid of lots of places that either set
-Wno-non-virtual-dtor or use some pragma to ignore -Wnon-virtual-dtor.

(In various places across extensions/source/activex/ and winaccessibility/, the commits f26996bd3398afa789a5491968244563ccf70908 "Silence-Werror,-Wnon-virtual-dtor in generated so_activex.h (clang-cl)" and c6086ca6535692496fbd718d174d8eb5a5dea7c7 "Silence -Werror,-Wnon-virtual-dtor in generated UAccCOM.h (clang-cl)" had singled out some includes to wrap them in pragmas. Now that those pragmas are gone again, move those includes back to where they had been prior to being singled out. And the -Wno-non-virtual-dtor in external/firebird/macos-arm64.patch.0 appeared first in ccd0e5f445d4a7d0e7aca6c23c02c61bf14510b2 "Make firebird build for macOS on arm64", which, though it doesn't state it explicitly, apparently created that patch's builds/posix/prefix.darwin_arm64 as a copy of firebird's already existing builds/posix/prefix.* files, which routinely include that warning option too, so keep it there too even if it is probably irrelevant throughout.)

Change-Id: I7e4fa9f2c07e267b2ed15607905027f6b78142f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143182

4521cb0c4090 Drop redundant -Wnon-virtual-dtor
bin/gen-boost-headers | 1 -
embedserv/source/inc/embeddocaccess.hxx | 1 -
embedserv/source/inc/stdafx.h | 1 -
extensions/source/activex/SOActionsApproval.cxx | 10 +---------
extensions/source/activex/SOActionsApproval.h | 7 -------
extensions/source/activex/SOActiveX.cxx | 10 +---------
extensions/source/activex/SOActiveX.h | 7 -------
extensions/source/activex/SOComWindowPeer.cxx | 10 +---------
extensions/source/activex/SOComWindowPeer.h | 7 -------
extensions/source/activex/SODispatchInterceptor.cxx | 10 +---------
extensions/source/activex/StdAfx2.h | 1 -
extensions/source/activex/so_activex.cxx | 8 --------
extensions/source/ole/oledll.cxx | 1 -
extensions/source/ole/unoobjw.cxx | 1 -
extensions/source/ole/wincrap.hxx | 1 -
extensions/source/ole/windata.hxx | 1 -
external/boost/include/boost/algorithm/string.hpp | 1 -
.../boost/include/boost/algorithm/string/predicate.hpp | 1 -
.../boost/archive/iterators/base64_from_binary.hpp | 1 -
.../boost/archive/iterators/binary_from_base64.hpp | 1 -
.../boost/archive/iterators/remove_whitespace.hpp | 1 -
.../boost/archive/iterators/transform_width.hpp | 1 -
external/boost/include/boost/bind.hpp | 1 -
external/boost/include/boost/cast.hpp | 1 -
external/boost/include/boost/circular_buffer.hpp | 1 -
external/boost/include/boost/container/flat_map.hpp | 1 -
.../boost/include/boost/container/small_vector.hpp | 1 -
external/boost/include/boost/cstdint.hpp | 1 -
external/boost/include/boost/current_function.hpp | 1 -
external/boost/include/boost/date_time.hpp | 1 -
.../include/boost/date_time/posix_time/posix_time.hpp | 1 -
external/boost/include/boost/filesystem.hpp | 1 -
external/boost/include/boost/filesystem/path.hpp | 1 -
external/boost/include/boost/functional/hash.hpp | 1 -
.../boost/include/boost/fusion/adapted/std_pair.hpp | 1 -
.../include/boost/fusion/include/adapt_struct.hpp | 1 -
.../boost/intrusive/circular_list_algorithms.hpp | 1 -
external/boost/include/boost/intrusive_ptr.hpp | 1 -
external/boost/include/boost/io/ios_state.hpp | 1 -
external/boost/include/boost/iostreams/filter/gzip.hpp | 1 -
.../boost/include/boost/iostreams/filtering_stream.hpp | 1 -
.../boost/include/boost/iterator/iterator_facade.hpp | 1 -
external/boost/include/boost/lexical_cast.hpp | 1 -
external/boost/include/boost/locale.hpp | 1 -
external/boost/include/boost/locale/gnu_gettext.hpp | 1 -
external/boost/include/boost/make_shared.hpp | 1 -
external/boost/include/boost/math/common_factor_rt.hpp | 1 -
.../include/boost/math/special_functions/expm1.hpp | 1 -
.../include/boost/math/special_functions/sinc.hpp | 1 -
external/boost/include/boost/multi_array.hpp | 1 -
.../boost/include/boost/multi_index/composite_key.hpp | 1 -
external/boost/include/boost/multi_index/identity.hpp | 1 -
external/boost/include/boost/multi_index/mem_fun.hpp | 1 -
.../boost/include/boost/multi_index/ordered_index.hpp | 1 -
.../include/boost/multi_index/random_access_index.hpp | 1 -
external/boost/include/boost/multi_index_container.hpp | 1 -
external/boost/include/boost/noncopyable.hpp | 1 -
external/boost/include/boost/none.hpp | 1 -
.../boost/include/boost/numeric/conversion/cast.hpp | 1 -
external/boost/include/boost/operators.hpp | 1 -
external/boost/include/boost/optional.hpp | 1 -
external/boost/include/boost/program_options.hpp | 1 -
.../boost/include/boost/property_tree/json_parser.hpp | 1 -
external/boost/include/boost/property_tree/ptree.hpp | 1 -
.../boost/include/boost/property_tree/ptree_fwd.hpp | 1 -
.../boost/include/boost/range/adaptor/reversed.hpp | 1 -
external/boost/include/boost/range/iterator_range.hpp | 1 -
external/boost/include/boost/rational.hpp | 1 -
external/boost/include/boost/scoped_ptr.hpp | 1 -
external/boost/include/boost/shared_ptr.hpp | 1 -
.../boost/include/boost/spirit/include/classic.hpp | 1 -
.../include/boost/spirit/include/classic_core.hpp | 1 -
.../boost/spirit/include/classic_error_handling.hpp | 1 -
.../boost/spirit/include/classic_file_iterator.hpp | 1 -
.../include/boost/spirit/include/classic_utility.hpp | 1 -
.../boost/include/boost/spirit/include/phoenix.hpp | 1 -
external/boost/include/boost/spirit/include/qi.hpp | 1 -
.../boost/include/boost/spirit/include/qi_attr.hpp | 1 -
external/boost/include/boost/spirit/include/qi_lit.hpp | 1 -
.../boost/include/boost/spirit/include/qi_optional.hpp | 1 -
.../include/boost/spirit/include/qi_parse_attr.hpp | 1 -
.../boost/include/boost/spirit/include/qi_sequence.hpp | 1 -
.../boost/include/boost/spirit/include/qi_symbols.hpp | 1 -
external/boost/include/boost/unordered_map.hpp | 1 -
external/boost/include/boost/uuid/uuid_generators.hpp | 1 -
external/boost/include/boost/uuid/uuid_io.hpp | 1 -
external/boost/include/boost/variant.hpp | 1 -
.../boost/include/boost/variant/recursive_variant.hpp | 1 -
external/boost/include/boost/version.hpp | 1 -
include/cppuhelper/implbase1.hxx | 6 ------
include/cppuhelper/implbase10.hxx | 6 ------
include/cppuhelper/implbase11.hxx | 6 ------
include/cppuhelper/implbase12.hxx | 6 ------
include/cppuhelper/implbase13.hxx | 6 ------
include/cppuhelper/implbase2.hxx | 6 ------
include/cppuhelper/implbase3.hxx | 6 ------
include/cppuhelper/implbase4.hxx | 6 ------
include/cppuhelper/implbase5.hxx | 6 ------
include/cppuhelper/implbase6.hxx | 6 ------
include/cppuhelper/implbase7.hxx | 6 ------
include/cppuhelper/implbase8.hxx | 6 ------
include/cppuhelper/implbase9.hxx | 6 ------
include/cppuhelper/propertysetmixin.hxx | 7 -------
include/cppuhelper/propshlp.hxx | 18 ------------------
shell/inc/spsupp/COMOpenDocuments.hpp | 7 -------
solenv/gbuild/platform/com_GCC_defs.mk | 3 +--
solenv/gbuild/platform/com_MSC_defs.mk | 1 -
winaccessibility/inc/AccObject.hxx | 8 --------
winaccessibility/inc/AccObjectWinManager.hxx | 8 --------
winaccessibility/source/UAccCOM/AccAction.cxx | 10 +---------
winaccessibility/source/UAccCOM/AccComponent.cxx | 10 +---------
winaccessibility/source/UAccCOM/AccEditableText.cxx | 10 +---------
winaccessibility/source/UAccCOM/AccHyperLink.cxx | 10 +---------
winaccessibility/source/UAccCOM/AccHypertext.cxx | 10 +---------
winaccessibility/source/UAccCOM/AccImage.cxx | 10 +---------
winaccessibility/source/UAccCOM/AccRelation.cxx | 10 +---------
winaccessibility/source/UAccCOM/AccTable.cxx | 10 +---------
winaccessibility/source/UAccCOM/AccText.cxx | 10 +---------
winaccessibility/source/UAccCOM/AccValue.cxx | 10 +---------
winaccessibility/source/UAccCOM/EnumVariant.cxx | 10 +---------
winaccessibility/source/UAccCOM/EnumVariant.h | 10 +---------
winaccessibility/source/UAccCOM/MAccessible.cxx | 10 +---------
winaccessibility/source/UAccCOM/UAccCOM.cxx | 10 +---------
winaccessibility/source/UAccCOM/UNOXWrapper.cxx | 10 +---------
winaccessibility/source/UAccCOM/UNOXWrapper.h | 8 --------
winaccessibility/source/UAccCOM/stdafx.h | 1 -
.../source/service/AccObjectManagerAgent.cxx | 7 -------
127 files changed, 20 insertions(+), 426 deletions(-)

Upstream: cgit.freedesktop.org


  • Share