[PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].
Fri Nov 5 21:16:34 GMT 2021
> On 5 Nov 2021, at 20:50, Jason Merrill via Gcc-patches <firstname.lastname@example.org> 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))
>> + && LAMBDA_FUNCTION_P (DECL_RAMP_FN (DECL_CONTEXT (decl))))));
> Are there other places that want to look through DECL_RAMP_FN like this, such that this should be factored into e.g.
> LAMBDA_FUNCTION_P (non_coroutine (DECL_CONTEXT (decl)))
At present, I am not aware of another use (there are none in my WIP fixes) - but that stack of macros is a bit of a mouthful - maybe a function would be neater anyway.
non_coroutine () doesn’t convey its meaning to me - what we are trying to say “get me the ramp context” but that’s very detailed.
Let me see if I can come up with a function and a name…
More information about the Gcc-patches