mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-13 12:07:06 +00:00
Fix logic of type suppression evaluation
* include/abg-comparison.cc (type_suppression::suppresses_diff): Try to evaluate the "type_name_regexp" property only if the "type_name" is empty. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
3816b22e6f
commit
ad9c8a1b61
@ -522,19 +522,22 @@ type_suppression::suppresses_diff(const diff* diff) const
|
|||||||
if (get_type_name() != fn && get_type_name() != sn)
|
if (get_type_name() != fn && get_type_name() != sn)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
// So now check if there is a regular expression match.
|
{
|
||||||
//
|
// So now check if there is a regular expression match.
|
||||||
// If none of the qualified name of the types that are being
|
//
|
||||||
// compared match the regular expression of the of the type name,
|
// If none of the qualified name of the types that are being
|
||||||
// then this suppression doesn't apply.
|
// compared match the regular expression of the of the type name,
|
||||||
const sptr_utils::regex_t_sptr type_name_regex = priv_->get_type_name_regex();
|
// then this suppression doesn't apply.
|
||||||
if (type_name_regex
|
const sptr_utils::regex_t_sptr type_name_regex =
|
||||||
&& (regexec(type_name_regex.get(), fn.c_str(),
|
priv_->get_type_name_regex();
|
||||||
0, NULL, 0) != 0
|
if (type_name_regex
|
||||||
&& regexec(type_name_regex.get(), sn.c_str(),
|
&& (regexec(type_name_regex.get(), fn.c_str(),
|
||||||
0, NULL, 0) != 0))
|
0, NULL, 0) != 0
|
||||||
return false;
|
&& regexec(type_name_regex.get(), sn.c_str(),
|
||||||
|
0, NULL, 0) != 0))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user