coroutines: Pass class ref to traits lookup and promise allocator [PR94760].
We changed the argument passed to the promise parameter preview to match a reference to *this. However to be consistent with the other ports, we do need to match the reference transformation in the traits lookup and the promise allocator lookup. gcc/cp/ChangeLog: 2020-04-28 Iain Sandoe <iain@sandoe.co.uk> PR c++/94760 * coroutines.cc (instantiate_coro_traits): Pass a reference to object type rather than a pointer type for 'this', for method coroutines. (struct param_info): Add a field to hold that the parm is a lambda closure pointer. (morph_fn_to_coro): Check for lambda closure pointers in the args. Use a reference to *this when building the args list for the promise allocator lookup. gcc/testsuite/ChangeLog: 2020-04-28 Iain Sandoe <iain@sandoe.co.uk> PR c++/94760 * g++.dg/coroutines/pr94760-mismatched-traits-and-promise-prev.C: New test.
Showing
Please
register
or
sign in
to comment