# HG changeset patch # User kbarrett # Date 1563465294 14400 # Node ID aeb1243220005212862254d037db974113f51082 # Parent 45133b603c219fbbca581f3327b551bd1915112e 8227652: SetupOperatorNewDeleteCheck should discuss deleting destructors Summary: Add comment describing deleting destructors Reviewed-by: dholmes diff -r 45133b603c21 -r aeb124322000 make/hotspot/lib/CompileJvm.gmk --- a/make/hotspot/lib/CompileJvm.gmk Thu Jul 18 07:54:21 2019 -0700 +++ b/make/hotspot/lib/CompileJvm.gmk Thu Jul 18 11:54:54 2019 -0400 @@ -260,6 +260,15 @@ # # Search the output for the operator(s) of interest, to see where they are # referenced. +# +# When a reference to the global 'operator delete' is reported, it might be +# due to a "deleting destructor". In this case, objdump may show the +# reference to be associated with but not actually in a destructor. A +# deleting destructor is automatically generated for a class whose destructor +# is virtual. A deleting destructor requires an accessible 'operator delete' +# for the associated class. If the class doesn't provide a more specific +# declaration (either directly or by inheriting from a class that provides +# one) then the global definition will be used, triggering this check. ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang solstudio), )