* coroutines.cc (morph_fn_to_coro): Just check for
closure_identifier.
* pt.c (tsubst_function_decl): Update lambda fn's this_ptr name.
+2020-05-05 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/94807
+ * coroutines.cc (morph_fn_to_coro): Just check for
+ closure_identifier.
+ * pt.c (tsubst_function_decl): Update lambda fn's this_ptr name.
+
2020-05-05 Marek Polacek <polacek@redhat.com>
Jason Merrill <jason@redhat.com>
closure object is named 'this' instead of '__closure'. */
if (lambda_p)
{
- parm.lambda_cobj = parm.this_ptr
- || (DECL_NAME (arg) == closure_identifier);
- parm.this_ptr = false;
+ parm.lambda_cobj = DECL_NAME (arg) == closure_identifier;
+ gcc_checking_assert (!parm.this_ptr);
}
else
parm.lambda_cobj = false;
if (closure)
{
tree tparm = build_this_parm (r, closure, type_memfn_quals (type));
+ DECL_NAME (tparm) = closure_identifier;
DECL_CHAIN (tparm) = parms;
parms = tparm;
}