* decl.c (copy_args_p): Handle copy elision for types with virtual
bases.
* call.c (build_over_call): Likewise.
From-SVN: r17022
+Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * decl.c (copy_args_p): Handle copy elision for types with virtual
+ bases.
+ * call.c (build_over_call): Likewise.
+
Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
* pt.c (lookup_template_function): Copy the template arguments,
&& copy_args_p (fn))
{
tree targ;
- arg = TREE_VALUE (TREE_CHAIN (converted_args));
+ arg = TREE_CHAIN (converted_args);
+ if (TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (fn)))
+ arg = TREE_CHAIN (arg);
+ arg = TREE_VALUE (arg);
/* Pull out the real argument, disregarding const-correctness. */
targ = arg;
tree d;
{
tree t = FUNCTION_ARG_CHAIN (d);
+ if (DECL_CONSTRUCTOR_P (d)
+ && TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (d)))
+ t = TREE_CHAIN (t);
if (t && TREE_CODE (TREE_VALUE (t)) == REFERENCE_TYPE
&& (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_VALUE (t)))
== DECL_CLASS_CONTEXT (d))