From patchwork Fri Sep 5 15:17:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 119816 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 E4F913858C83 for ; Tue, 9 Sep 2025 06:47:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4F913858C83 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=cBOzv2Ro X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 864903858D35 for ; Tue, 9 Sep 2025 06:47:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 864903858D35 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine 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 864903858D35 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=1757400424; cv=none; b=lpIZ9RTUyoNvxRJXRxVw0Nh4xnU+nCDIfiXzU3lmiAgfvtCfgzDd92HlWKt8Axfx4JykJnSYcqE6+ha+ptbnrYkjqwC9m96ghQ2rKhZWjZP9KS71hF5YDLlZVKFl9yuxXSCIhViTKg/iAQFIV2sQack1ibXiNQarL96L8ftgX8A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757400424; c=relaxed/simple; bh=04VeqHmIRQo3fjsdDGPSmteQT8SmnSsyT+hZyrmtfZk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LpyW5UstkiUjI0o/toIgrhHn3S+1O+sfRIZrxMAecA+fZQPXPnJlCySlTO2PqtnmwXjMaAXg5TSuBa5QKysj7hNbqCyB/ftoa0Jpu7oF0pTgretrj+V5teqYqa5lS9i82qsLB+pUAOvWhXJEhT45+YYMZLr6DgYy/KaLqqKTEN8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 864903858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1757400424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=1VVRSSIXL0xeyT/QXNwHnGYAEBtCPJiJ3kkZB5UhlKI=; b=cBOzv2RomM8OC6m7jDC3L0WJ2ZovS+NrFudIGYv2wW15K9sE8up6YNpnk17B2SY7bKYFgP K/xggzU6YCuGkNBZrhTlE0OiXuHKKaSldPmtj/3kltrvAcf5qxFDrzkuN+yfYyN8kAYDBa AifF+BO8WAMTrUXs1R6lStgnhWBKbSI= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-231-9jE8mr00NO6FGa2hffMqgA-1; Tue, 09 Sep 2025 02:46:58 -0400 X-MC-Unique: 9jE8mr00NO6FGa2hffMqgA-1 X-Mimecast-MFC-AGG-ID: 9jE8mr00NO6FGa2hffMqgA_1757400418 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 355E41800366 for ; Tue, 9 Sep 2025 06:46:58 +0000 (UTC) Received: from localhost (unknown [10.44.22.20]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 787D41800447 for ; Tue, 9 Sep 2025 06:46:57 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 5AE9B6038448; Fri, 05 Sep 2025 17:17:02 +0200 (CEST) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH, applied] dwarf-reader,ir: Cleanup signatures of copy_member_function Organization: Red Hat / France X-Operating-System: Fedora 42 X-URL: http://www.redhat.com Date: Fri, 05 Sep 2025 17:17:02 +0200 Message-ID: <87ms79hqtt.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: f2SiYfYF1B1ZRjfJW6ewRecBcq5SSajg4T7kfxyI5U4_1757400418 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.7 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, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, 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 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces~patchwork=sourceware.org@sourceware.org Hello, * include/abg-ir.h (copy_member_function): Make the destination class not be a const reference. * src/abg-ir.cc (copy_member_function): Likewise. * src/abg-dwarf-reader.cc (copy_missing_member_functions): Likewise. Signed-off-by: Dodji Seketeli Applied to the master branch. --- include/abg-ir.h | 20 ++++++-------------- src/abg-dwarf-reader.cc | 2 +- src/abg-ir.cc | 12 ++++++------ 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/include/abg-ir.h b/include/abg-ir.h index d8ce0435..de53e00d 100644 --- a/include/abg-ir.h +++ b/include/abg-ir.h @@ -4133,11 +4133,11 @@ public: virtual ~class_or_union(); friend method_decl_sptr - copy_member_function(class_or_union_sptr& t, + copy_member_function(class_or_union_sptr t, const method_decl*m); friend method_decl_sptr - copy_member_function(class_or_union_sptr& t, + copy_member_function(class_or_union_sptr t, const method_decl_sptr& m); friend void @@ -4156,14 +4156,6 @@ public: friend class class_decl; }; // end class class_or_union -method_decl_sptr -copy_member_function(const class_or_union_sptr& clazz, - const method_decl_sptr& f); - -method_decl_sptr -copy_member_function(const class_or_union_sptr& clazz, - const method_decl* f); - bool operator==(const class_or_union_sptr& l, const class_or_union_sptr& r); @@ -4319,11 +4311,11 @@ bool equals(const class_decl&, const class_decl&, change_kind*); method_decl_sptr -copy_member_function(const class_decl_sptr& clazz, +copy_member_function(class_decl_sptr clazz, const method_decl_sptr& f); method_decl_sptr -copy_member_function(const class_decl_sptr& clazz, +copy_member_function(class_decl_sptr clazz, const method_decl* f); void fixup_virtual_member_function(method_decl_sptr method); @@ -4476,11 +4468,11 @@ bool equals(const union_decl&, const union_decl&, change_kind*); method_decl_sptr -copy_member_function(const union_decl_sptr& union_type, +copy_member_function(union_decl_sptr union_type, const method_decl_sptr& f); method_decl_sptr -copy_member_function(const union_decl_sptr& union_type, +copy_member_function(union_decl_sptr union_type, const method_decl* f); bool diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index a41f0caf..baa9026c 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -4830,7 +4830,7 @@ public: /// on the destination one, then it's copied from the source class /// to the destination one. void - copy_missing_member_functions(const class_decl_sptr& dest_class, + copy_missing_member_functions(class_decl_sptr& dest_class, const class_decl_sptr& src_class) { for (auto method : src_class->get_member_functions()) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 18676e5b..3ed0b4bc 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -24832,7 +24832,7 @@ equals(const class_or_union& l, const class_or_union& r, change_kind* k) /// /// @return the resulting newly copied method. method_decl_sptr -copy_member_function(const class_or_union_sptr& t, +copy_member_function(class_or_union_sptr t, const method_decl_sptr& method) {return copy_member_function(t, method.get());} @@ -24846,7 +24846,7 @@ copy_member_function(const class_or_union_sptr& t, /// /// @return the resulting newly copied method. method_decl_sptr -copy_member_function(const class_or_union_sptr& t, const method_decl* method) +copy_member_function(class_or_union_sptr t, const method_decl* method) { ABG_ASSERT(t); ABG_ASSERT(method); @@ -26259,7 +26259,7 @@ equals(const class_decl& l, const class_decl& r, change_kind* k) /// /// @return the resulting newly copied method. method_decl_sptr -copy_member_function(const class_decl_sptr& clazz, const method_decl_sptr& f) +copy_member_function(class_decl_sptr clazz, const method_decl_sptr& f) {return copy_member_function(static_pointer_cast(clazz), f);} /// Copy a method of a class into a new class. @@ -26270,7 +26270,7 @@ copy_member_function(const class_decl_sptr& clazz, const method_decl_sptr& f) /// /// @return the resulting newly copied method. method_decl_sptr -copy_member_function(const class_decl_sptr& clazz, const method_decl* f) +copy_member_function(class_decl_sptr clazz, const method_decl* f) {return copy_member_function(static_pointer_cast(clazz), f);} /// Comparison operator for @ref class_decl. @@ -27342,7 +27342,7 @@ equals(const union_decl& l, const union_decl& r, change_kind* k) /// /// @return the resulting newly copied method. method_decl_sptr -copy_member_function(const union_decl_sptr& union_type, +copy_member_function(union_decl_sptr union_type, const method_decl_sptr& f) {return copy_member_function(union_type, f.get());} @@ -27355,7 +27355,7 @@ copy_member_function(const union_decl_sptr& union_type, /// /// @return the resulting newly copied method. method_decl_sptr -copy_member_function(const union_decl_sptr& union_type, +copy_member_function(union_decl_sptr union_type, const method_decl* f) { const class_or_union_sptr t = union_type;