mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-02 06:41:40 +00:00
6668baaff4
Some ABI artifact declared in the internal representation don't have inequality operator (!=) declared. I thought relying on the != operator provided by std::rel_ops would be enough, but it's not. Sometimes, especially for smart pointers to ABI artifacts we do not want the != operator of shared_ptr to be picked by argument dependent lookup. Rather, we want the deep operator!= to be picked up. In certain cases, this was causing subtle spurious change comparison reports. This patch thus systematically declares (and defines) operator!= whenever operator== is declared. * include/abg-ir.h ({translation_unit, elf_symbol::version, context_rel, decl_base, type_base, type_decl, array_type_def::subrange_type, enum_type_def::enumerator, dm_context_rel, template_parameter}::operator!=): Declare. (operator==): Make the overload form translation_unit_sptr, scope_decl_sptr, class_decl::base_spec_sptr, class_decl::member_function_template_sptr, class_decl::member_class_template_sptr take const references. (operator!=): Declare an an overload for the non-member operator != of translation_unit_sptr, elf_symbol_sptr, type_or_decl_base_sptr, type_base_sptr, scope_decl_sptr, type_decl, qualified_type_def_sptr, pointer_type_def_sptr, reference_type_def_sptr, enum_type_decl_sptr, class_decl_sptr, class_decl::base_spec_sptr, class_decl::member_function_template_sptr, class_decl::member_class_template_sptr. * src/abg-ir.cc ({translation_unit, elf_symbol::version, context_rel, decl_base, type_base, type_decl, array_type_def::subrange_type, enum_type_def::enumerator, dm_context_rel, template_parameter}::operator!=): Define. (operator==): Make the overload for translation_unit_sptr, scope_decl_sptr, class_decl::base_spec_sptr, class_decl::member_function_template_sptr, class_decl::member_class_template_sptr take const references. (operator!=): Define an an overload for the non-member operator != of translation_unit_sptr, elf_symbol_sptr, type_or_decl_base_sptr, type_base_sptr, scope_decl_sptr, type_decl, qualified_type_def_sptr, pointer_type_def_sptr, reference_type_def_sptr, enum_type_decl_sptr, class_decl_sptr, class_decl::base_spec_sptr, class_decl::member_function_template_sptr, class_decl::member_class_template_sptr. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
abg-comp-filter.h | ||
abg-comparison.h | ||
abg-config.h | ||
abg-corpus.h | ||
abg-diff-utils.h | ||
abg-dwarf-reader.h | ||
abg-fwd.h | ||
abg-hash.h | ||
abg-ini.h | ||
abg-ir.h | ||
abg-libxml-utils.h | ||
abg-libzip-utils.h | ||
abg-reader.h | ||
abg-sptr-utils.h | ||
abg-tools-utils.h | ||
abg-traverse.h | ||
abg-version.h.in | ||
abg-viz-common.h | ||
abg-viz-dot.h | ||
abg-viz-svg.h | ||
abg-workers.h | ||
abg-writer.h | ||
Makefile.am |