Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-08-01 Thread Martin Liška
PING^1 On 07/18/2018 03:49 PM, Martin Liška wrote: > On 07/18/2018 02:40 PM, Jason Merrill wrote: >> On Wed, Jul 18, 2018 at 7:03 PM, Martin Liška wrote: >>> On 07/18/2018 03:45 AM, Jason Merrill wrote: On Mon, Jul 16, 2018 at 5:23 PM, Martin Liška wrote: > For purpose of --coverage I w

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-18 Thread Martin Liška
On 07/18/2018 02:40 PM, Jason Merrill wrote: > On Wed, Jul 18, 2018 at 7:03 PM, Martin Liška wrote: >> On 07/18/2018 03:45 AM, Jason Merrill wrote: >>> On Mon, Jul 16, 2018 at 5:23 PM, Martin Liška wrote: For purpose of --coverage I would like to distinguish lambda functions among DECL_

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-18 Thread Jason Merrill
On Wed, Jul 18, 2018 at 7:03 PM, Martin Liška wrote: > On 07/18/2018 03:45 AM, Jason Merrill wrote: >> On Mon, Jul 16, 2018 at 5:23 PM, Martin Liška wrote: >>> For purpose of --coverage I would like to distinguish lambda functions >>> among DECL_ARTIFICIAL functions. >> >> I'm curious, why? > > I

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-18 Thread Martin Liška
On 07/18/2018 03:45 AM, Jason Merrill wrote: > On Mon, Jul 16, 2018 at 5:23 PM, Martin Liška 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 fun

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-17 Thread Jason Merrill
On Mon, Jul 16, 2018 at 5:23 PM, Martin Liška wrote: > For purpose of --coverage I would like to distinguish lambda functions > among DECL_ARTIFICIAL functions. I'm curious, why? Jason

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-17 Thread Richard Biener
On Tue, Jul 17, 2018 at 1:35 PM Martin Liška wrote: > > On 07/16/2018 06:09 PM, Nathan Sidwell wrote: > > On 07/16/2018 12:04 PM, Richard Biener wrote: > > > >> Just use a spare bit in function_decl, then we can simply stream it. > > > > If there's one, then sure. (you've reminded me that there a

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-17 Thread Martin Liška
On 07/16/2018 06:09 PM, Nathan Sidwell wrote: > On 07/16/2018 12:04 PM, Richard Biener wrote: > >> Just use a spare bit in function_decl, then we can simply stream it. > > If there's one, then sure.  (you've reminded me that there are a bunch of > mutually disjoint flags in function_decl that co

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-16 Thread Nathan Sidwell
On 07/16/2018 12:04 PM, Richard Biener wrote: Just use a spare bit in function_decl, then we can simply stream it. If there's one, then sure. (you've reminded me that there are a bunch of mutually disjoint flags in function_decl that could be collapsed to an enumeration. This may be anothe

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-16 Thread Richard Biener
On July 16, 2018 4:30:42 PM GMT+02:00, Nathan Sidwell wrote: >On 07/16/2018 03:23 AM, Martin Liška wrote: >> 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 i

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-16 Thread Nathan Sidwell
On 07/16/2018 03:23 AM, Martin Liška wrote: 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)

How to easily identify that a FUNCTION_DECL is a lambda

2018-07-16 Thread Martin Liška
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