mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-18 16:04:34 +00:00
0c820488d4
References are always const. But then GCC sometimes emits DWARF that represents a const reference. This leads, for instance, to a given reference to be considered as different from that same reference wraps into a const qualifier. Which is wrong. Libabigail then represents those const references as a particular case of a "no-op qualifier". That is, a qualifier that should be ignored by the comparison code. In the case of this issue, the comparison engine considers the two references (const and non-const) to be equal, but the reporting code forgets to ignore the ignore no-op qualifier and thus (wrongly) considers the two references as being different. That inconsistency leads to an abort of the process. This patch moves the code that ignores no-op qualifiers at a lower level of the comparison engine so that whenever function parameters are compared, no-op qualifiers are ignored as they should. * include/abg-fwd.h (look_through_no_op_qualified_type): Declare new function. * src/abg-ir.cc (look_through_no_op_qualified_type): Define it. (compute_diff_for_types): Use the new look_through_no_op_qualified_type here rather than open-coding it. (equals): In the overload for function_decl::parameter, use the new look_through_no_op_qualified_type function. * tests/data/test-diff-dwarf/test40-PR21296-clanggcc.cc: Source code of the new test inputs. * tests/data/test-diff-dwarf/test40-PR21296-clanggcc-report0.txt: New test input. * tests/data/test-diff-dwarf/test40-PR21296-libgcc.so: New binary test input. * tests/data/test-diff-dwarf/test40-PR21296-libclang.so: Likewise. * tests/test-diff-dwarf.cc (in_out_specs): Add the new test inputs to the test harness. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
abg-comp-filter.h | ||
abg-comparison.h | ||
abg-config.h | ||
abg-corpus.h | ||
abg-diff-utils.h | ||
abg-dwarf-reader.h | ||
abg-fwd.h | ||
abg-hash.h | ||
abg-ini.h | ||
abg-interned-str.h | ||
abg-ir.h | ||
abg-libxml-utils.h | ||
abg-libzip-utils.h | ||
abg-reader.h | ||
abg-sptr-utils.h | ||
abg-suppression.h | ||
abg-tools-utils.h | ||
abg-traverse.h | ||
abg-version.h.in | ||
abg-viz-common.h | ||
abg-viz-dot.h | ||
abg-viz-svg.h | ||
abg-workers.h | ||
abg-writer.h | ||
Makefile.am |