]> sourceware.org Git - libabigail.git/commit
Categorize CV qualifier changes on fn return types as harmless
authorDodji Seketeli <dodji@redhat.com>
Tue, 2 Oct 2018 11:49:55 +0000 (13:49 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 2 Oct 2018 12:02:22 +0000 (14:02 +0200)
commita16e97596b2c1395b5cac2f8c98e243c6e4eebcd
tree82479c95d218433437b53b433460246a2d4433e4
parent60daf958ae092c1bb00f6bc8eeab00b2b29ec1be
Categorize CV qualifier changes on fn return types as harmless

This partially fixes PR23700.

A change in the CV qualifiers of a function return value type should
be categorized as harmless.  And this is what this patch does.

* include/abg-comparison.h (FN_RETURN_TYPE_CV_CHANGE_CATEGORY):
New enumerator for diff_category.
(EVERYTHING_CATEGORY): Update.
* src/abg-comp-filter.cc (type_diff_has_cv_qual_change_only):
Factorize this function out of ...
(has_fn_parm_type_cv_qual_change): ... this one.
(has_fn_return_type_cv_qual_change): Define new static function.
(categorize_harmless_diff_node): Use the new
has_fn_return_type_cv_qual_change.
* src/abg-comparison.cc (get_default_harmless_categories_bitmap):
Adjust to add the new FN_RETURN_TYPE_CV_CHANGE_CATEGORY category.
(operator<<(ostream& o, diff_category c)): Support the new
FN_RETURN_TYPE_CV_CHANGE_CATEGORY.
* tests/data/Makefile.am: Add the new test material below to
source distribution.
* tests/data/test-diff-filter/test46-fn-return-qual-change-report-0.txt:
New reference output for the new input test.
* tests/data/test-diff-filter/test46-fn-return-qual-change-v{0,1}.c:
New source code for the new binary test input.
* tests/data/test-diff-filter/test46-fn-return-qual-change-v{0,1}.o:
New binary test input files.
* tests/test-diff-filter.cc: Add the new test input above to test
harness.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-comparison.h
src/abg-comp-filter.cc
src/abg-comparison.cc
tests/data/Makefile.am
tests/data/test-diff-filter/test46-fn-return-qual-change-report-0.txt [new file with mode: 0644]
tests/data/test-diff-filter/test46-fn-return-qual-change-v0.c [new file with mode: 0644]
tests/data/test-diff-filter/test46-fn-return-qual-change-v0.o [new file with mode: 0644]
tests/data/test-diff-filter/test46-fn-return-qual-change-v1.c [new file with mode: 0644]
tests/data/test-diff-filter/test46-fn-return-qual-change-v1.o [new file with mode: 0644]
This page took 0.108405 seconds and 5 git commands to generate.