mirror of
git://sourceware.org/git/libabigail.git
synced 2025-03-10 08:37:41 +00:00
Spit and polish variables presentation in diff report
* src/abg-comparison.cc (corpus_diff::report): Show the full representation of the variable, rather than just its name. Also, show the new representation of the variable only if it has changed. * tests/data/test-diff-dwarf/test9-report.txt: Adjust test. * tests/data/test-diff-filter/test15-0-report.txt: Likewise. * tests/data/test-diff-filter/test15-1-report.txt: Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
4200a7cbb9
commit
6ebf695323
@ -9662,21 +9662,13 @@ corpus_diff::report(ostream& out, const string& indent) const
|
||||
if (!diff->to_be_reported())
|
||||
continue;
|
||||
|
||||
if (!f->get_linkage_name().empty())
|
||||
n1 = demangle_cplus_mangled_name(f->get_linkage_name());
|
||||
else
|
||||
n1 = f->get_pretty_representation();
|
||||
n1 = f->get_pretty_representation();
|
||||
n2 = s->get_pretty_representation();
|
||||
|
||||
if (!s->get_linkage_name().empty())
|
||||
n2 = demangle_cplus_mangled_name(s->get_linkage_name());
|
||||
else
|
||||
n2 = s->get_pretty_representation();
|
||||
|
||||
out << indent << " '"
|
||||
<< n1
|
||||
<< "' was changed to '"
|
||||
<< n2
|
||||
<< "':\n";
|
||||
out << indent << " '" << n1 << "' was changed";
|
||||
if (n1 != n2)
|
||||
out << " to '" << n2 << "'";
|
||||
out << ":\n";
|
||||
diff->report(out, indent + " ");
|
||||
}
|
||||
if (num_changed)
|
||||
|
@ -5,7 +5,7 @@ Variables changes summary: 0 Removed, 1 Changed, 1 Added variables
|
||||
'unsigned int global_var2'
|
||||
|
||||
1 Changed variable:
|
||||
'global_var0' was changed to 'global_var0':
|
||||
'int global_var0' was changed to 'char global_var0':
|
||||
type of variable changed:
|
||||
name changed from 'int' to 'char'
|
||||
size changed from 32 to 8 bits
|
||||
|
@ -2,7 +2,7 @@ Functions changes summary: 0 Removed, 0 Changed, 0 Added function
|
||||
Variables changes summary: 0 Removed, 1 Changed (1 filtered out), 0 Added variable
|
||||
|
||||
1 Changed variable:
|
||||
'var1' was changed to 'var1':
|
||||
'S* var1' was changed:
|
||||
type of variable changed:
|
||||
in pointed to type 'struct S':
|
||||
size changed from 64 to 96 bits
|
||||
|
@ -3,13 +3,13 @@ Variables changes summary: 0 Removed, 2 Changed, 0 Added variables
|
||||
|
||||
2 Changed variables:
|
||||
|
||||
'var1' was changed to 'var1':
|
||||
'S* var1' was changed:
|
||||
type of variable changed:
|
||||
in pointed to type 'struct S':
|
||||
size changed from 64 to 96 bits
|
||||
1 data member insertion:
|
||||
'unsigned int S::m2', at offset 64 (in bits)
|
||||
'var2' was changed to 'var2':
|
||||
'S* var2' was changed:
|
||||
type of variable changed:
|
||||
pointed to type 'struct S' changed, as reported earlier
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user