* [Bug default/25982] New: clang build: address -Woverloaded-virtual
@ 2020-05-13 9:18 maennich at android dot com
0 siblings, 0 replies; only message in thread
From: maennich at android dot com @ 2020-05-13 9:18 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=25982
Bug ID: 25982
Summary: clang build: address -Woverloaded-virtual
Product: libabigail
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: default
Assignee: dodji at redhat dot com
Reporter: maennich at android dot com
CC: libabigail at sourceware dot org
Target Milestone: ---
When compiling with clang, the warning 'overloaded-virtual' is emitted in some
locations. Sample:
In file included from abg-ir.cc:41:
include/abg-ir.h:361:3: warning: 'abigail::ir::ir_traversable_base::traverse'
hides overloaded virtual function [-Woverloaded-virtual]
traverse(ir_node_visitor& v);
^
include/abg-traverse.h:95:16: note: hidden overloaded virtual function
'abigail::ir::traversable_base::traverse' declared here: type mismatch at 1st
parameter ('abigail::ir::node_visitor_base &' vs 'abigail::ir::ir_node_visitor
&')
virtual bool traverse(node_visitor_base& v);
^
In file included from abg-ir.cc:41:
include/abg-ir.h:696:3: warning: 'abigail::ir::translation_unit::traverse'
hides overloaded virtual function [-Woverloaded-virtual]
traverse(ir_node_visitor& v);
^
include/abg-traverse.h:95:16: note: hidden overloaded virtual function
'abigail::ir::traversable_base::traverse' declared here: type mismatch at 1st
parameter ('abigail::ir::node_visitor_base &' vs 'abigail::ir::ir_node_visitor
&')
virtual bool traverse(node_visitor_base& v);
^
In file included from abg-ir.cc:41:
include/abg-ir.h:3734:3: warning:
'abigail::ir::class_or_union::insert_member_decl' hides overloaded virtual
function [-Woverloaded-virtual]
insert_member_decl(decl_base_sptr member, declarations::iterator before);
^
include/abg-ir.h:1664:3: note: hidden overloaded virtual function
'abigail::ir::scope_decl::insert_member_decl' declared here: type mismatch at
1st parameter ('const abigail::ir::decl_base_sptr &' (aka 'const
shared_ptr<abigail::ir::decl_base> &') vs 'abigail::ir::decl_base_sptr' (aka
'shared_ptr<abigail::ir::decl_base>'))
insert_member_decl(const decl_base_sptr& member,
^
Commit e5e8cb95434e ("configure: set -Wno-error-overloaded-virtual for clang
builds") addresses this in the code by demoting the warning to not be an error.
But we should check whether the compiler actually has a point with this.
Dodji thinks (https://sourceware.org/pipermail/libabigail/2020q2/002217.html),
"I am not even sure that warning needs fixing because we intentionally
use virtual operator overloading for comparison operators in the design
of the IR."
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-13 9:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 9:18 [Bug default/25982] New: clang build: address -Woverloaded-virtual maennich at android dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).