From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id D834E385B52D for ; Fri, 27 Oct 2023 22:29:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D834E385B52D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D834E385B52D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698445775; cv=none; b=WIu0XoF5LCSxqOOYY17DGEtW3/zAm7J+t2LpDN9vMV3+QKY88CqiJFgdhbv3/oJj3QToNeLVu1iwiEW0U5fz1qcy8dUoZAFoIWTHf3vUmoQpwTwEDMY7Yz1NtgxcXmP382YmL2mnTTUNRZHSUH9EsOO+yO49ovSmQ8yV0/V+2gY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698445775; c=relaxed/simple; bh=6G2wgfc2jXKeZagBw2gKe1//tbDWrU8Vlcj/eMw9hTs=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=r5LMYh4+CwIIpUBybHkJp+yLdDN/PWD6w4IhQ41MDE6JJOT+UpGobBk0PibKdSyaolca3mBs45skPpI4C7ewu4AfI65Pk7Pz5JFp0t+1N5qhVSY01wIlWvMLbYHl0Lu6OTyvReMnnTG9yMzHFGdYEZS1qcDow0jDofb54jtvn70= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698445773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ftvzgo5KoaS5MeSk1R4DKZwPzS0odyFJpDr6AYkURuM=; b=gwL6ollnegQg/iRWfQUH5RMQzge/wCinSQIWg0YW/9i1HKh7GgLAzgg2mxN2kKtn9isV4h IK9uZXdWfaEJTQ9GyRyuAC0bycGy/mOr4pSmV4B2OWTsvlkR5j8s6Z47CLBw9zh+6FJrcK 4ECjIqATtq0uqeLhht0cKAgZMiJZsxU= Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-371-5Y8AhekoPo6iWibc_G5r8Q-1; Fri, 27 Oct 2023 18:29:32 -0400 X-MC-Unique: 5Y8AhekoPo6iWibc_G5r8Q-1 Received: by mail-oi1-f200.google.com with SMTP id 5614622812f47-3b2b1ac753fso3830214b6e.1 for ; Fri, 27 Oct 2023 15:29:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698445771; x=1699050571; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ftvzgo5KoaS5MeSk1R4DKZwPzS0odyFJpDr6AYkURuM=; b=ZTeWwVQxSl88/QZ+Snaux70BTGX23r2E8Ql54FtZ6gpHJ9uY2tIQkQTZarhF+UShZX 2V8ppg2My4nE+htA4vaNjZXkXS7BkuWOpq7IFSfruS0Nf5qk1Mg0rZ4CdjtsWQKiw3hR GOeHwOOW0xfwG8kzrAptT4daeE+aFeEdp6p07PR7ZUV4weTqoBokMb3sm1Ne88DFFwLm JEBrt4f7twuJ2wAPHapOSLpTtYd91sO64i3n9Sne9WdVNqllzjzexm80GFo3a6u1yDvO 5op2+Aw558vtqBOWUOEpoDTRqVegSoXPmYMsbRzSe1qqcR30t+EEu20ewVl9V2K5AhER 5p4g== X-Gm-Message-State: AOJu0YwIuQmrb2p1F6do0DVmnVc8f1Ng/wIMaaMB017p1u0RBM8qfmnm iNAe9YmikR6x+QLFTNoyaQQ95B/DYIwB2JjBvyptp2az1KW073j7Jhf9x+ccEnJ3HrvXyIRv5Aa geqQFQxnOVKDrr/tJ5khQ50YAcw== X-Received: by 2002:a05:6808:4197:b0:3a7:5cc1:69b0 with SMTP id dj23-20020a056808419700b003a75cc169b0mr4339748oib.7.1698445771200; Fri, 27 Oct 2023 15:29:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFyhS0FhY4TawjLOqBl8ns5xqI+awOapdNvy8aDjJEdH71dqz+dLRU47qSeHmG8hXm3X3lB9w== X-Received: by 2002:a05:6808:4197:b0:3a7:5cc1:69b0 with SMTP id dj23-20020a056808419700b003a75cc169b0mr4339741oib.7.1698445770953; Fri, 27 Oct 2023 15:29:30 -0700 (PDT) Received: from [192.168.1.108] (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id c11-20020a0ce14b000000b0065823d20381sm1005786qvl.8.2023.10.27.15.29.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Oct 2023 15:29:30 -0700 (PDT) Message-ID: <35674d69-7c49-4b2d-99fb-977cf34e7e9a@redhat.com> Date: Fri, 27 Oct 2023 18:29:28 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/3] c++: note other candidates when diagnosing deletedness To: Patrick Palka , gcc-patches@gcc.gnu.org References: <20231027195532.2566822-1-ppalka@redhat.com> <20231027195532.2566822-3-ppalka@redhat.com> From: Jason Merrill In-Reply-To: <20231027195532.2566822-3-ppalka@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/27/23 15:55, Patrick Palka wrote: > With the previous two patches in place, we can now extend our > deletedness diagnostic to note the other considered candidates, e.g.: > > deleted16.C: In function 'int main()': > deleted16.C:10:4: error: use of deleted function 'void f(int)' > 10 | f(0); > | ~^~~ > deleted16.C:5:6: note: declared here > 5 | void f(int) = delete; > | ^ > deleted16.C:5:6: note: candidate: 'void f(int)' (deleted) > deleted16.C:6:6: note: candidate: 'void f(...)' > 6 | void f(...); > | ^ > deleted16.C:7:6: note: candidate: 'void f(int, int)' > 7 | void f(int, int); > | ^ > deleted16.C:7:6: note: candidate expects 2 arguments, 1 provided > > These notes are controlled by a new command line flag -fnote-all-cands, > which also controls whether we note ignored candidates more generally. > > gcc/ChangeLog: > > * doc/invoke.texi (C++ Dialect Options): Document -fnote-all-cands. > > gcc/c-family/ChangeLog: > > * c.opt: Add -fnote-all-cands. > > gcc/cp/ChangeLog: > > * call.cc (print_z_candidates): Only print ignored candidates > when -fnote-all-cands is set. > (build_over_call): When diagnosing deletedness, call > print_z_candidates if -fnote-all-cands is set. My suggestion was also to suggest using the flag in cases where it would make a difference, e.g. note: some candidates omitted, use '-fnote-all-cands' to display them Maybe "-fdiagnostics-all-candidates"? Jason