mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-09 10:07:14 +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)
|
||||
return false;
|
||||
}
|
||||
|
||||
// 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,
|
||||
// then this suppression doesn't apply.
|
||||
const sptr_utils::regex_t_sptr type_name_regex = priv_->get_type_name_regex();
|
||||
if (type_name_regex
|
||||
&& (regexec(type_name_regex.get(), fn.c_str(),
|
||||
0, NULL, 0) != 0
|
||||
&& regexec(type_name_regex.get(), sn.c_str(),
|
||||
0, NULL, 0) != 0))
|
||||
return false;
|
||||
else
|
||||
{
|
||||
// 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,
|
||||
// then this suppression doesn't apply.
|
||||
const sptr_utils::regex_t_sptr type_name_regex =
|
||||
priv_->get_type_name_regex();
|
||||
if (type_name_regex
|
||||
&& (regexec(type_name_regex.get(), fn.c_str(),
|
||||
0, NULL, 0) != 0
|
||||
&& regexec(type_name_regex.get(), sn.c_str(),
|
||||
0, NULL, 0) != 0))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user