mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-25 19:22:07 +00:00
Do not use the parent diff node link for category propagation
* src/abg-comparison.cc (class_diff::traverse): Use the new TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY macro to propagate categorization from the children diff nodes to the current one for bases, data members and member functions. (scope_diff::traverse): Likewise, use the TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY to propagate categorization from the children diff nodes to the current one. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
13c6c8ebed
commit
c957d7b747
@ -3510,17 +3510,10 @@ class_diff::traverse(diff_node_visitor& v)
|
||||
priv_->changed_bases_.begin();
|
||||
i != priv_->changed_bases_.end();
|
||||
++i)
|
||||
{
|
||||
diff_sptr d = compute_diff(i->second.first,
|
||||
i->second.second,
|
||||
context());
|
||||
d->set_parent(this);
|
||||
if (d && !d->traverse(v))
|
||||
{
|
||||
priv_->traversing_ = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (diff_sptr d = compute_diff(i->second.first,
|
||||
i->second.second,
|
||||
context()))
|
||||
TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY(d, v);
|
||||
|
||||
// data member changes
|
||||
for (string_changed_type_or_decl_map::const_iterator i =
|
||||
@ -3530,14 +3523,7 @@ class_diff::traverse(diff_node_visitor& v)
|
||||
if (diff_sptr d = compute_diff_for_decls(i->second.first,
|
||||
i->second.second,
|
||||
context()))
|
||||
{
|
||||
d->set_parent(this);
|
||||
if (!d->traverse(v))
|
||||
{
|
||||
priv_->traversing_ = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY(d, v);
|
||||
|
||||
// member types changes
|
||||
for (string_changed_type_or_decl_map::const_iterator i =
|
||||
@ -3554,19 +3540,10 @@ class_diff::traverse(diff_node_visitor& v)
|
||||
priv_->changed_member_functions_.begin();
|
||||
i != priv_->changed_member_functions_.end();
|
||||
++i)
|
||||
{
|
||||
if (diff_sptr d = compute_diff_for_decls(i->second.first,
|
||||
i->second.second,
|
||||
context()))
|
||||
{
|
||||
d->set_parent(this);
|
||||
if (!d->traverse(v))
|
||||
{
|
||||
priv_->traversing_ = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (diff_sptr d = compute_diff_for_decls(i->second.first,
|
||||
i->second.second,
|
||||
context()))
|
||||
TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY(d, v);
|
||||
|
||||
TRY_POST_VISIT_CLASS_DIFF(v);
|
||||
|
||||
@ -4350,11 +4327,7 @@ scope_diff::traverse(diff_node_visitor& v)
|
||||
if (diff_sptr d = compute_diff_for_types(i->second.first,
|
||||
i->second.second,
|
||||
context()))
|
||||
{
|
||||
d->set_parent(this);
|
||||
if (!d->traverse(v))
|
||||
return false;
|
||||
}
|
||||
TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY(d, v);
|
||||
|
||||
for (string_changed_type_or_decl_map::const_iterator i =
|
||||
changed_decls().begin();
|
||||
@ -4363,11 +4336,7 @@ scope_diff::traverse(diff_node_visitor& v)
|
||||
if (diff_sptr d = compute_diff_for_decls(i->second.first,
|
||||
i->second.second,
|
||||
context()))
|
||||
{
|
||||
d->set_parent(this);
|
||||
if (!d->traverse(v))
|
||||
return false;
|
||||
}
|
||||
TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY(d, v);
|
||||
|
||||
TRY_POST_VISIT(v);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user