Hi.

For purpose of --coverage I would like to distinguish lambda functions
among DECL_ARTIFICIAL functions. Currently, cp-tree.h provides macro:

/* Test if FUNCTION_DECL is a lambda function.  */
#define LAMBDA_FUNCTION_P(FNDECL)                               \
  (DECL_DECLARES_FUNCTION_P (FNDECL)                            \
   && DECL_OVERLOADED_OPERATOR_P (FNDECL)                       \
   && DECL_OVERLOADED_OPERATOR_IS (FNDECL, CALL_EXPR)           \
   && LAMBDA_TYPE_P (CP_DECL_CONTEXT (FNDECL)))

That's FE-specific function that probably should not be called from
middle-end. Any idea how to distinguish lambdas?

Thanks,
Martin

Reply via email to