mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-23 17:36:52 +00:00
ir: Support comparing a class_decl against a class_or_union
When a class_decl is compared against a class_or_union type using class_decl::operator==, that operator systematically fails. This patch fixes that by comparing the common parts between the two objects. * src/abg-ir.cc (class_decl::operator==): Support comparing against a class_or_union. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
0284239bb1
commit
d1bba71063
@ -25647,7 +25647,11 @@ class_decl::operator==(const decl_base& other) const
|
||||
{
|
||||
const class_decl* op = is_class_type(&other);
|
||||
if (!op)
|
||||
return false;
|
||||
{
|
||||
if (class_or_union* cou = is_class_or_union_type(&other))
|
||||
return class_or_union::operator==(*cou);
|
||||
return false;
|
||||
}
|
||||
|
||||
// If this is a decl-only type (and thus with no canonical type),
|
||||
// use the canonical type of the definition, if any.
|
||||
|
Loading…
Reference in New Issue
Block a user