2017-02-22 Jason Merrill <jason@redhat.com>
+ PR c++/79679 - missing destructor for argument
+ * call.c (build_over_call): Don't pass tf_no_cleanup to argument
+ conversions.
+
* pt.c (do_class_deduction): Handle 0 argument case.
2017-02-22 Jakub Jelinek <jakub@redhat.com>
if (flags & LOOKUP_NO_CONVERSION)
conv->user_conv_p = true;
- val = convert_like_with_context (conv, arg, fn, i - is_method,
- conversion_warning
- ? complain
- : complain & (~tf_warning));
+ tsubst_flags_t arg_complain = complain & (~tf_no_cleanup);
+ if (!conversion_warning)
+ arg_complain &= ~tf_warning;
- val = convert_for_arg_passing (type, val, complain);
+ val = convert_like_with_context (conv, arg, fn, i - is_method,
+ arg_complain);
+ val = convert_for_arg_passing (type, val, arg_complain);
if (val == error_mark_node)
return error_mark_node;