Re: [PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].

2021-12-17 Thread Iain Sandoe
Hi Jason, > On 5 Nov 2021, at 21:53, Jason Merrill wrote: > > On 11/5/21 17:16, Iain Sandoe wrote: >> Hi Jason, >>> On 5 Nov 2021, at 20:50, Jason Merrill via Gcc-patches >>> wrote: >>> >>> On 11/5/21 12:01, Iain Sandoe wrote: +|| (DECL_DECLARES_FUNCTION_P (DECL_CONTEXT (decl)) >

Re: [PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].

2021-11-05 Thread Iain Sandoe
Hi Jason > On 5 Nov 2021, at 21:53, Jason Merrill wrote: > > On 11/5/21 17:16, Iain Sandoe wrote: >> Hi Jason, >>> On 5 Nov 2021, at 20:50, Jason Merrill via Gcc-patches >>> wrote: >>> >>> On 11/5/21 12:01, Iain Sandoe wrote: +|| (DECL_DECLARES_FUNCTION_P (DECL_CONTEXT (decl)) >>

Re: [PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].

2021-11-05 Thread Jason Merrill via Gcc-patches
On 11/5/21 17:16, Iain Sandoe wrote: Hi Jason, On 5 Nov 2021, at 20:50, Jason Merrill via Gcc-patches wrote: On 11/5/21 12:01, Iain Sandoe wrote: + || (DECL_DECLARES_FUNCTION_P (DECL_CONTEXT (decl)) + && DECL_COROUTINE_P (DECL_CONTEXT (decl)) + &&

Re: [PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].

2021-11-05 Thread Iain Sandoe
Hi Jason, > On 5 Nov 2021, at 20:50, Jason Merrill via Gcc-patches > wrote: > > On 11/5/21 12:01, Iain Sandoe wrote: >> + || (DECL_DECLARES_FUNCTION_P (DECL_CONTEXT (decl)) >> + && DECL_COROUTINE_P (DECL_CONTEXT (decl)) >> + && DECL_RAMP_FN (DECL_CONTEXT (decl

Re: [PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].

2021-11-05 Thread Jason Merrill via Gcc-patches
On 11/5/21 12:01, Iain Sandoe wrote: + || (DECL_DECLARES_FUNCTION_P (DECL_CONTEXT (decl)) + && DECL_COROUTINE_P (DECL_CONTEXT (decl)) + && DECL_RAMP_FN (DECL_CONTEXT (decl)) + && LAMBDA_FUNCTION_P (DECL_RAMP_FN (DECL_CONTEXT (decl));

[PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].

2021-11-05 Thread Iain Sandoe via Gcc-patches
When we query is_capture_proxy(), and the scope of the var is one of the two coroutine helpers, we need to look for the scope information that pertains to the original function (represented by the ramp now). We can look up the ramp function from either helper (in practice, the only caller would be