Functions and methods in public header shadows private functions
Opened this issue · 0 comments
We are having problems with functions with the same name but different types in the public and private ABI. It seems abi-dumper considers the function in the private abi public as well.
For example:
// public/foo.hh
class Foo;
bool operator==(const Foo& a, const Foo& b);
// private/bar.hh
class Bar;
bool operator==(const Bar& a, const Bar& b);
$ abi-dumper.pl libfoo.so -lver 1 -public-headers public -o foo.dump
When we remove bool operator==(const Bar& a, const Bar& b)
from the library it is marked as an ABI change by abi-compliance-checker.pl which I think it shouldn't be. Am I misunderstanding something?
I have uploaded a small repro case where I expect void foo1(int)
(_Z4foo1i) and void foo3()
(_Z4foo3v) to be private as void foo2()
is. But instead they appear in the SymbolInfo
map, not marked private. Note that void foo3()
is made public because of void Foo::foo3()
(!).
OS: RHEL 7.7
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
ABI Dumper 1.1
Vtable-Dumper 1.2
Exuberant Ctags 5.8