From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by sourceware.org (Postfix) with ESMTPS id 6994F3842400 for ; Fri, 10 Jul 2020 16:26:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6994F3842400 Received: by mail-wm1-x343.google.com with SMTP id f139so6496331wmf.5 for ; Fri, 10 Jul 2020 09:26:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gYxck+UWQGacs3MUp6SudjseCISF9RKSTo6KKB+Bi4w=; b=VzWY+X8ZDTjfeUj0uCj4Kx86PgnHzPKdnTEfs6WTmYo8wT8PmtR/kBP3MWhZNnZA+E hgPhMfiuOJhCnq9FrUnUwtF3BwPC+Cb1ixBD+h26e9amskkY5OjXXGC+pkowdvafhMTf ko4IikJeGJMyy0pnMMV7egTnqbZvwB36yNjBH5vl2GoVbcH5oYktyC29IQqnKvIueEsi U9A+hMPLanESHzzQjNvUDIATu/qV10uPieVyISgf4Zc5TnJqEVsCL5l2+/btrQzpLuKn mK6JwZTFI9Vsw31H6Smyt4UeW++Sa/ENGiLONz8KUgbFNy4/ZBGI7ZGB0Z01gGZ4sIia NfTw== X-Gm-Message-State: AOAM531Ai4WrUjaSI+Wi5qnESrZsqQ//JNrbBDLU2zZSmL13wzRNJZ4T jjK3Jlh/BsB5+dXFUWL03BmILQ== X-Google-Smtp-Source: ABdhPJzloYbO3impxGpzBf9xvdVYUyy5EzstGX/sh4qXZ/L4E2Bt9aKuParhjzRwJ3TIT1k/TW+H8A== X-Received: by 2002:a7b:ca52:: with SMTP id m18mr5872744wml.92.1594398372234; Fri, 10 Jul 2020 09:26:12 -0700 (PDT) Received: from google.com ([2a00:79e0:d:110:7220:84ff:fe09:a3aa]) by smtp.gmail.com with ESMTPSA id e8sm11217459wrp.26.2020.07.10.09.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 09:26:11 -0700 (PDT) Date: Fri, 10 Jul 2020 18:26:11 +0200 From: Matthias Maennich To: Giuliano Procida Cc: libabigail@sourceware.org, dodji@seketeli.org, kernel-team@android.com Subject: Re: [PATCH 1/3] Drop traversable_base::traverse method. Message-ID: <20200710162611.GG995455@google.com> References: <20200709164523.1578400-1-gprocida@google.com> <20200709182250.1677238-1-gprocida@google.com> <20200709182250.1677238-2-gprocida@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200709182250.1677238-2-gprocida@google.com> X-Spam-Status: No, score=-29.1 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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: Fri, 10 Jul 2020 16:26:15 -0000 On Thu, Jul 09, 2020 at 07:22:48PM +0100, Giuliano Procida wrote: >The traverse method is defined in the traversable_base class but is >never used as the synonymous methods in the derived classes have >different argument types and so hide it. > >The function can be removed and consequently the source file >abg-traverse.cc too. > >This removes a trigger of Clang's -Werror-overloaded-virtual which is >enabled with -Wmost which is enabled by -Wall. > > * include/abg-traverse.h (class traversable_base): Add > class-level comment about expected usage, drop declaration of > traverse method. > * src/Makefile.am: Remove mention of src/abg-traverse.cc. > * src/abg-traverse.cc: Remove file as it only contains the > unused traversable_base::traverse method. > >Signed-off-by: Giuliano Procida Reviewed-by: Matthias Maennich Cheers, Matthias >--- > include/abg-traverse.h | 21 ++++++--------------- > src/Makefile.am | 1 - > src/abg-traverse.cc | 43 ------------------------------------------ > 3 files changed, 6 insertions(+), 59 deletions(-) > delete mode 100644 src/abg-traverse.cc > >diff --git a/include/abg-traverse.h b/include/abg-traverse.h >index a7170dad..2cb84804 100644 >--- a/include/abg-traverse.h >+++ b/include/abg-traverse.h >@@ -44,6 +44,12 @@ struct node_visitor_base > > /// The interface for types which are feeling social and want to be > /// visited during the traversal of a hierarchy of nodes. >+/// >+/// It is expected that classes derived from traversable_base define a >+/// traverse method specialised to the node *visitor* type. Such >+/// methods should visit nodes recursively, calling >+/// ir_node_visitor::visit for each node. The method should return >+/// true until all nodes have been visited. > class traversable_base > { > bool visiting_; >@@ -78,21 +84,6 @@ public: > {} > > virtual ~traversable_base() {} >- >- /// This virtual method is overloaded and implemented by any single >- /// type which instance is going to be visited during the traversal >- /// of translation unit nodes. >- /// >- /// The method visits a given node and, for scopes, visits their >- /// member nodes. Visiting a node means calling the >- /// ir_node_visitor::visit method with the node passed as an >- /// argument. >- /// >- /// @param v the visitor used during the traverse. >- /// >- /// @return true if traversed until the end of the type tree, false >- /// otherwise. >- virtual bool traverse(node_visitor_base& v); > }; > > }// end namespace ir. >diff --git a/src/Makefile.am b/src/Makefile.am >index 1153a5f8..7684e373 100644 >--- a/src/Makefile.am >+++ b/src/Makefile.am >@@ -13,7 +13,6 @@ endif > > libabigail_la_SOURCES = \ > abg-internal.h \ >-abg-traverse.cc \ > abg-ir-priv.h \ > abg-ir.cc \ > abg-corpus-priv.h \ >diff --git a/src/abg-traverse.cc b/src/abg-traverse.cc >deleted file mode 100644 >index 3fb87ea2..00000000 >--- a/src/abg-traverse.cc >+++ /dev/null >@@ -1,43 +0,0 @@ >-// -*- Mode: C++ -*- >-// >-// Copyright (C) 2013-2020 Red Hat, Inc. >-// >-// This file is part of the GNU Application Binary Interface Generic >-// Analysis and Instrumentation Library (libabigail). This library is >-// free software; you can redistribute it and/or modify it under the >-// terms of the GNU Lesser General Public License as published by the >-// Free Software Foundation; either version 3, or (at your option) any >-// later version. >- >-// This library is distributed in the hope that it will be useful, but >-// WITHOUT ANY WARRANTY; without even the implied warranty of >-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >-// General Lesser Public License for more details. >- >-// You should have received a copy of the GNU Lesser General Public >-// License along with this program; see the file COPYING-LGPLV3. If >-// not, see . >- >-/// @file >- >-#include "abg-internal.h" >-// >-ABG_BEGIN_EXPORT_DECLARATIONS >- >-#include "abg-traverse.h" >- >-ABG_END_EXPORT_DECLARATIONS >-// >- >-namespace abigail >-{ >- >-namespace ir >-{ >- >-bool >-traversable_base::traverse(node_visitor_base&) >-{return true;} >- >-}// end namaspace ir >-}// end namespace abigail >-- >2.27.0.383.g050319c2ae-goog >