From patchwork Tue Jun 7 14:16:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 54889 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 444C238133F0 for ; Tue, 7 Jun 2022 14:17:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 444C238133F0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1654611435; bh=JNDk7xk04pyY1s8feKJyE/VdoRJNUAQGYN+a6aThNgE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=SA4gPNzZnUy8QPtAzxsCAFDlPThnqjudmev19K932Az8SLRMXVj+ZnGFCEI5Sy0DC h7pOB2o/nylE9To0gDLMrEzFcQ8oLsXdppni9zZHxWkPwXn1M//klvK3oLRVvf7IFE nr14dZO0g9fJJ6HgNh2niA68fVNC5Wo+oOliD21g= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 CA1343814FF6 for ; Tue, 7 Jun 2022 14:16:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CA1343814FF6 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-97-h42BkM5fPLudYC0_HPivEg-1; Tue, 07 Jun 2022 10:16:43 -0400 X-MC-Unique: h42BkM5fPLudYC0_HPivEg-1 Received: by mail-qv1-f70.google.com with SMTP id z10-20020ad4414a000000b004644d6dafe3so10964057qvp.11 for ; Tue, 07 Jun 2022 07:16:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JNDk7xk04pyY1s8feKJyE/VdoRJNUAQGYN+a6aThNgE=; b=XWUVutbjRHuAdOzCSEOzXl9V+NKh+ZZS2+8RKwTiCFJlsslvVF4p1ydO0IyNg7ty/q zLL4LeB1zjS+7Lvk3haTHDGXuknXlg2WNsCVeTgsgz/VHunmdiHevw5iDZf50BqCOHCA U0kon60zjdh5kyLmj9o9YDdCLcGlIrIC5SPwybHfnpZBICMOMTwGYUA9Y2aegnGo9yur Ap0W+LGI8sUQbPCvMVOzkh9Rd0K6Tr49Yg79W7Lc+HIInt0Ui8PsAaEOm5aKXN8LPrrH rAvRGheenByx+J4F2KSOOQLcVSjYvzg4iqGyEOB+bciZEMvJ74r+9aoHZKhkV4vnBvwu DFQg== X-Gm-Message-State: AOAM531SMH6wNEWCq+02AMaGuPmRgPjTbHGLVtvMtQlAv6MdVae97SFV RAmH0felDe0cGUyBuXGQl3XiUE27D1QnOhCC7ihyLz+esg9ZC2AQRKY3R/VmCU8N7vTLv5v0VrE Gn9zq9I34Li3B0lb41fb0i2O+tSWxgtPn4nSAuMXq5lHc0r5DLOxt0lwIP/Wb8213hrA= X-Received: by 2002:a05:6214:3006:b0:443:cf1e:58d7 with SMTP id ke6-20020a056214300600b00443cf1e58d7mr21760643qvb.53.1654611402564; Tue, 07 Jun 2022 07:16:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrj5T4AIPrqHB24mYBCVZ0RProztEQTaFXqgjeB51nuQ/liEPj5IvNMr2xuETiGhNUwqLZNw== X-Received: by 2002:a05:6214:3006:b0:443:cf1e:58d7 with SMTP id ke6-20020a056214300600b00443cf1e58d7mr21760601qvb.53.1654611402115; Tue, 07 Jun 2022 07:16:42 -0700 (PDT) Received: from localhost.localdomain (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id h9-20020ac85e09000000b002f93c5444e3sm13261755qtx.52.2022.06.07.07.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 07:16:41 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] c++: remove single-parameter version of mark_used Date: Tue, 7 Jun 2022 10:16:40 -0400 Message-Id: <20220607141640.2017557-1-ppalka@redhat.com> X-Mailer: git-send-email 2.36.1.299.gab336e8f1c MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Patrick Palka via Gcc-patches From: Patrick Palka Reply-To: Patrick Palka Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" gcc/cp/ChangeLog: * cp-tree.h (mark_used): Remove single-parameter overload. Add default argument to the two-parameter overload. * decl2.cc (mark_used): Likewise. --- gcc/cp/cp-tree.h | 3 +-- gcc/cp/decl2.cc | 8 +------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index cc13809f38a..ac5b3eef118 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -6932,8 +6932,7 @@ extern bool decl_constant_var_p (tree); extern bool decl_maybe_constant_var_p (tree); extern void no_linkage_error (tree); extern void check_default_args (tree); -extern bool mark_used (tree); -extern bool mark_used (tree, tsubst_flags_t); +extern bool mark_used (tree, tsubst_flags_t = tf_warning_or_error); extern bool mark_single_function (tree, tsubst_flags_t); extern void finish_static_data_member_decl (tree, tree, bool, tree, int); extern tree cp_build_parm_decl (tree, tree, tree); diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc index 974afe798b6..f15381be5f1 100644 --- a/gcc/cp/decl2.cc +++ b/gcc/cp/decl2.cc @@ -5730,7 +5730,7 @@ mark_single_function (tree expr, tsubst_flags_t complain) wrong, true otherwise. */ bool -mark_used (tree decl, tsubst_flags_t complain) +mark_used (tree decl, tsubst_flags_t complain /* = tf_warning_or_error */) { /* If we're just testing conversions or resolving overloads, we don't want any permanent effects like forcing functions to be @@ -5974,12 +5974,6 @@ mark_used (tree decl, tsubst_flags_t complain) return true; } -bool -mark_used (tree decl) -{ - return mark_used (decl, tf_warning_or_error); -} - tree vtv_start_verification_constructor_init_function (void) {