How to easily identify that a FUNCTION_DECL is a lambda
Martin Liška
mliska@suse.cz
Wed Jul 18 09:03:00 GMT 2018
On 07/18/2018 03:45 AM, Jason Merrill wrote:
> On Mon, Jul 16, 2018 at 5:23 PM, Martin Liška <mliska@suse.cz> wrote:
>> For purpose of --coverage I would like to distinguish lambda functions
>> among DECL_ARTIFICIAL functions.
>
> I'm curious, why?
>
> Jason
>
It's important for GCOV to report coverage for functions that are
really present in a source file. Lambdas are such functions.
On the other hand functions like _Z41__static_initialization_and_destruction_*
or some implicit constructors (Centering<3>::Centering(Centering<3> const&))
should not be reported. It confuses a user. Note that both have a valid
location and one can't distinguish them.
That's why I would like to sort out lambdas from others.
Martin
More information about the Gcc
mailing list