Remove references, arrays and fn parms from leaf diff nodes

It doesn't make sense to report about I leaf diff nodes that are
either references, arrays of function parameters.  It makes more sense
to have these be reported as part of their containing diff nodes.

This patch fixes that.

	* src/abg-comparison.cc
	(leaf_diff_node_marker_visitor::visit_begin): Do not mark
	references, array and fn parms diff nodes as leaf nodes.
	* tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
	Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2018-05-16 09:30:31 +02:00
parent a0d8a4d3e5
commit 81770b4284
2 changed files with 12 additions and 13 deletions

View File

@ -9866,11 +9866,17 @@ struct leaf_diff_node_marker_visitor : public diff_node_visitor
// Similarly, a *local* change describing a type that changed
// its nature doesn't make sense.
&& !is_distinct_diff(d)
// Similarly, a pointer change in itself doesn't make sense.
// It's would rather make sense to show that pointer change as
// part of the variable change whose pointer type changed, for
// instance.
// Similarly, a pointer (or reference or array) change in
// itself doesn't make sense. It's would rather make sense to
// show that pointer change as part of the variable change
// whose pointer type changed, for instance.
&& !is_pointer_diff(d)
&& !is_reference_diff(d)
&& !is_array_diff(d)
// Similarly a parameter chagne in itself doesn't make sense.
// It should have already been reported as part of the change
// of the function it belongs to.
&& !is_fn_parm_diff(d)
// An anonymous class or union diff doesn't make sense on its
// own. It must have been described already by the diff of
// the enclosing struct or union if 'd' is from an anonymous

View File

@ -1,6 +1,6 @@
================ changes of 'libspice-server.so.1.8.0'===============
Leaf changes summary: 14 artifacts changed (8 filtered out)
Changed leaf types summary: 3 (8 filtered out) leaf types changed
Leaf changes summary: 13 artifacts changed (7 filtered out)
Changed leaf types summary: 2 (7 filtered out) leaf types changed
Removed/Changed/Added functions summary: 1 Removed, 2 Changed, 8 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
@ -66,13 +66,6 @@ Leaf changes summary: 14 artifacts changed (8 filtered out)
'typedef spice_image_compression_t at spice.h:479:1' changed:
typedef name changed from spice_image_compression_t to SpiceImageCompression at enums.h:197:1
2 impacted interfaces:
function spice_image_compression_t spice_server_get_image_compression(SpiceServer*)
function int spice_server_set_image_compression(SpiceServer*, spice_image_compression_t)
'typedef spice_image_compression_t parameter-2' changed:
parameter 2 of type 'typedef spice_image_compression_t' changed:
typedef name changed from spice_image_compression_t to SpiceImageCompression at enums.h:197:1
2 impacted interfaces:
function spice_image_compression_t spice_server_get_image_compression(SpiceServer*)
function int spice_server_set_image_compression(SpiceServer*, spice_image_compression_t)