On 11/5/21 17:16, Iain Sandoe wrote:
Hi Jason,
On 5 Nov 2021, at 20:50, Jason Merrill via Gcc-patches
<gcc-patches@gcc.gnu.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.
I figured what we want is the user-written function corresponding to the
argument. Hmm, the coroutine helpers don't use DECL_ABSTRACT_ORIGIN, do
they?
Jason