+2019-02-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/89422 - ICE with -g and lambda in default arg in template.
+ * pt.c (tsubst_function_decl): SET_DECL_FRIEND_CONTEXT sooner.
+
2019-02-21 Jason Merrill <jason@redhat.com>
PR c++/88419 - C++17 ICE with class template arg deduction.
set_constraints (r, ci);
}
+ if (DECL_FRIEND_P (t) && DECL_FRIEND_CONTEXT (t))
+ SET_DECL_FRIEND_CONTEXT (r,
+ tsubst (DECL_FRIEND_CONTEXT (t),
+ args, complain, in_decl));
+
/* Set up the DECL_TEMPLATE_INFO for R. There's no need to do
this in the special friend case mentioned above where
GEN_TMPL is NULL. */
&& !grok_op_properties (r, /*complain=*/true))
return error_mark_node;
- if (DECL_FRIEND_P (t) && DECL_FRIEND_CONTEXT (t))
- SET_DECL_FRIEND_CONTEXT (r,
- tsubst (DECL_FRIEND_CONTEXT (t),
- args, complain, in_decl));
-
/* Possibly limit visibility based on template args. */
DECL_VISIBILITY (r) = VISIBILITY_DEFAULT;
if (DECL_VISIBILITY_SPECIFIED (t))