mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-11 20:09:30 +00:00
Fix class diff reporting issues for base classes
* src/abg-comparison.cc (class_diff::report): For base classes, report their pretty representation. Do not try to report a the diff of a changed base class that got filtered out. Avoid emitting too many vertical white spaces. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
f66dda8f1b
commit
a436ee1094
@ -3344,12 +3344,13 @@ class_diff::report(ostream& out, const string& indent) const
|
||||
if ( priv_->base_has_changed(base))
|
||||
continue;
|
||||
out << indent << " "
|
||||
<< base->get_base_class()->get_qualified_name();
|
||||
<< base->get_base_class()->get_pretty_representation();
|
||||
}
|
||||
out << "\n\n";
|
||||
out << "\n";
|
||||
}
|
||||
|
||||
// Report changes.
|
||||
bool emitted = false;
|
||||
size_t num_filtered = priv_->count_filtered_bases(context());
|
||||
if (numchanges)
|
||||
{
|
||||
@ -3364,13 +3365,17 @@ class_diff::report(ostream& out, const string& indent) const
|
||||
dynamic_pointer_cast<class_decl::base_spec>(it->second.first);
|
||||
class_decl::base_spec_sptr n =
|
||||
dynamic_pointer_cast<class_decl::base_spec>(it->second.second);
|
||||
diff_sptr diff = compute_diff(o, n, context());
|
||||
if (!diff->to_be_reported())
|
||||
continue;
|
||||
out << indent << " '"
|
||||
<< o->get_base_class()->get_pretty_representation()
|
||||
<< "' changed:\n";
|
||||
diff_sptr dif = compute_diff(o, n, context());
|
||||
dif->report(out, indent + " ");
|
||||
diff->report(out, indent + " ");
|
||||
emitted = true;
|
||||
}
|
||||
out << "\n";
|
||||
if (emitted)
|
||||
out << "\n";
|
||||
}
|
||||
|
||||
//Report insertions.
|
||||
@ -3389,7 +3394,7 @@ class_diff::report(ostream& out, const string& indent) const
|
||||
class_decl_sptr b = i->second->get_base_class();
|
||||
if (emitted)
|
||||
out << "\n";
|
||||
out << indent << b->get_qualified_name();
|
||||
out << indent << " " << b->get_pretty_representation();
|
||||
emitted = true;
|
||||
}
|
||||
out << "\n";
|
||||
|
Loading…
Reference in New Issue
Block a user