8227652: SetupOperatorNewDeleteCheck should discuss deleting destructors
authorkbarrett
Thu, 18 Jul 2019 11:54:54 -0400
changeset 55738 aeb124322000
parent 55737 45133b603c21
child 55739 ba2bd51ce67e
8227652: SetupOperatorNewDeleteCheck should discuss deleting destructors Summary: Add comment describing deleting destructors Reviewed-by: dholmes
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), )