From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by sourceware.org (Postfix) with ESMTPS id A31EF3857033 for ; Mon, 27 Jul 2020 16:14:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A31EF3857033 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dodji@seketeli.org X-Originating-IP: 91.166.131.130 Received: from localhost (91-166-131-130.subs.proxad.net [91.166.131.130]) (Authenticated sender: dodji@seketeli.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 737CC2000C; Mon, 27 Jul 2020 16:14:13 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 3B126180090F; Mon, 27 Jul 2020 18:14:12 +0200 (CEST) From: Dodji Seketeli To: Giuliano Procida Cc: libabigail@sourceware.org, kernel-team@android.com, maennich@google.com Subject: Re: [PATCH 2/3] Fix inheritance of scope_decl::insert_member_decl Organization: Me, myself and I References: <20200709164523.1578400-1-gprocida@google.com> <20200709182250.1677238-1-gprocida@google.com> <20200709182250.1677238-3-gprocida@google.com> X-Operating-System: Red Hat Enterprise Linux Workstation 7.8 Beta X-URL: http://www.seketeli.net/~dodji Date: Mon, 27 Jul 2020 18:14:12 +0200 In-Reply-To: <20200709182250.1677238-3-gprocida@google.com> (Giuliano Procida's message of "Thu, 9 Jul 2020 19:22:49 +0100") Message-ID: <871rkxhr57.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2020 16:14:16 -0000 Giuliano Procida a =C3=A9crit: > The classes class_decl, class_or_union and scope_decl derive from each > other. The method insert_member_decl is declared virtual and defined > in each of these. Unfortunately, it has different argument types in > the base scope_decl class. > > Most calls to insert_member_decl are at a statically known class, but > in insert_decl_into_scope the method is called via a scope_decl > pointer. There is the possibility that this could be a type derived > from scope_decl rather than scope_decl itself, in which case the base > method would be called, not as intended. > > This commit adjusts the type of the member argument to > scope_decl::insert_member_decl to match the other two classes and > eliminates the last trigger of Clang's -Werror-overloaded-virtual. > > * include/abg-ir.h (scope_decl::insert_member_decl): Change > type of member argument from const decl_base_sptr& to plain > decl_base_sptr. > * src/abg-ir.cc (scope_decl::insert_member_decl): Likewise. > > Signed-off-by: Giuliano Procida Applied to master, thanks! Cheers, --=20 Dodji