Better detect when pointer and qualified types carry local changes
authorDodji Seketeli <dodji@redhat.com>
Fri, 1 Jun 2018 12:49:46 +0000 (14:49 +0200)
committerDodji Seketeli <dodji@redhat.com>
Fri, 1 Jun 2018 12:49:46 +0000 (14:49 +0200)
commit7c16fa9a7f912a1fae60105f834e3e0691c2035b
tree04776794ccc2f3bb9fce602427eef20e311e024c
parent11c2437a19ee000b9217c81670813611ed0bc312
Better detect when pointer and qualified types carry local changes

This is a fixup of the previous commit entitled:

    "Better detect when diff nodes only carry local type changes"

In that previous commit, I missed some things about pointer, reference
and qualified types, as far as local changes detection and management
is concerned.

This commit handles those points.

* src/abg-comparison.cc
(leaf_diff_node_marker_visitor::visit_begin): Do not mark
qualified types as leaf diff nodes.
(redundancy_marking_visitor::visit_end): Changes to qualified type
are never considered local.  This is just as for pointer and
reference types.
* src/abg-default-reporter.cc
(default_reporter::report_local_reference_type_changes): Display
structural changes of the pointed-to type.
(default_reporter::report): In the overload for reference_diff,
better detect and handle when we have local changes, or not.
* src/abg-ir.cc (equals): In the overload for qualified_type_def
and reference_type_de, report local type changes of the underlying
type as local changes.  Add comments in the overload for pointer
type, and make it look like the the overload for reference_type.
* src/abg-leaf-reporter.cc (leaf_reporter::report): In the
overload for pointer_diff, remove end of line.
* tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt: Adjust.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt: Likewise.
* tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-comparison.cc
src/abg-default-reporter.cc
src/abg-ir.cc
src/abg-leaf-reporter.cc
tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt
tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt
tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt
tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt
tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt