From: Dodji Seketeli <dodji@redhat.com> Date: Wed, 10 Sep 2014 16:07:11 +0000 (+0200) Subject: Compare class names when comparing methods X-Git-Tag: 1.0.rc0~541 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=bcbb58d53a9798b07f921b9e95e273431565f86e;p=libabigail.git Compare class names when comparing methods Signed-off-by: Dodji Seketeli <dodji@redhat.com> --- diff --git a/src/abg-ir.cc b/src/abg-ir.cc index ab9281d0..e79aeaad 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -4382,6 +4382,19 @@ compare_function_types(const function_type& lhs, catch (...) {} + // Compare the names of the class of the method + + if (!!lhs_class != !!rhs_class) + return false; + + if (lhs_class + && (lhs_class->get_qualified_name() != rhs_class->get_qualified_name())) + return false; + + // Then compare the return type; Beware if it's t's a class type + // that is the same as the method class name; we can recurse for + // ever in that case. + decl_base_sptr lhs_return_type_decl = get_type_declaration(lhs.get_return_type()); decl_base_sptr rhs_return_type_decl =