diff mbox

[C++] PR 34927 (Take 2)

Message ID 4E90C21E.2050908@oracle.com
State New
Headers show

Commit Message

Paolo Carlini Oct. 8, 2011, 9:35 p.m. UTC
Hi again,

today I had a look to clone_function_decl & co, and came up with the 
below. I understand DECL_DELETING_DESTRUCTOR_P would work as well...

Tested x86_64-linux.

Thanks,
Paolo.

///////////////////
2011-10-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/34927
	* typeck2.c (abstract_virtuals_error_sfinae): Don't produce duplicate
	inform messages in case of cloned destructor.

Comments

Jason Merrill Oct. 8, 2011, 10:59 p.m. UTC | #1
OK.

Jason
diff mbox

Patch

Index: typeck2.c
===================================================================
--- typeck2.c	(revision 179660)
+++ typeck2.c	(working copy)
@@ -340,7 +340,10 @@  abstract_virtuals_error_sfinae (tree decl, tree ty
 	      type);
 
       FOR_EACH_VEC_ELT (tree, pure, ix, fn)
-	inform (input_location, "\t%+#D", fn);
+	if (! DECL_CLONED_FUNCTION_P (fn)
+	    || DECL_COMPLETE_DESTRUCTOR_P (fn))
+	  inform (input_location, "\t%+#D", fn);
+
       /* Now truncate the vector.  This leaves it non-null, so we know
 	 there are pure virtuals, but empty so we don't list them out
 	 again.  */