From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47870 invoked by alias); 18 Jul 2018 12:40:50 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 47858 invoked by uid 89); 18 Jul 2018 12:40:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=H*f:sk:ae16a87, H*i:sk:ae16a87, basis X-HELO: mail-oi0-f43.google.com Received: from mail-oi0-f43.google.com (HELO mail-oi0-f43.google.com) (209.85.218.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Jul 2018 12:40:49 +0000 Received: by mail-oi0-f43.google.com with SMTP id v8-v6so8470742oie.5 for ; Wed, 18 Jul 2018 05:40:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:531d:0:0:0:0:0 with HTTP; Wed, 18 Jul 2018 05:40:27 -0700 (PDT) In-Reply-To: References: <2bc49528-72cc-46fd-2105-63d292074034@suse.cz> From: Jason Merrill Date: Wed, 18 Jul 2018 12:40:00 -0000 Message-ID: Subject: Re: How to easily identify that a FUNCTION_DECL is a lambda To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: GCC Development , Nathan Sidwell Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00257.txt.bz2 On Wed, Jul 18, 2018 at 7:03 PM, Martin Li=C5=A1ka wrote: > On 07/18/2018 03:45 AM, Jason Merrill wrote: >> On Mon, Jul 16, 2018 at 5:23 PM, Martin Li=C5=A1ka wrot= e: >>> For purpose of --coverage I would like to distinguish lambda functions >>> among DECL_ARTIFICIAL functions. >> >> I'm curious, why? > > 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_destruct= ion_* > 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. Those other functions may have *a* location, but only DECL_SOURCE_LOCATION; could we distinguish on that basis? Jason