Hello, is_non_canonicalized_type uses is_declaration_only_class_or_union_type to detect decl-only classes, but it doesn't differentiate between decl-only classes that are associated to a class definition and those that are not. We want to avoid canonicalizing decl-only classes that are not associated to any class definition. This patch fixes the invocation of is_declaration_only_class_or_union_type to express the above assertion. This fix uncovered another self-comparison issue that was being expressed when running the command below: $ abidw --abidiff tests/data/test-types-stability/PR27086-libstdc++.so.6.0.26 That one was due to an error in method_decl::set_linkage_name which was making classes contain the wrong overloads of methods. The patch fixes that error too. * include/abg-fwd.h (is_pointer_to_decl_only_class_or_union_type) (is_reference_to_decl_only_class_or_union_type) (is_typedef_to_decl_only_class_or_union_type): Remove declarations. (is_typedef_ptr_or_ref_to_decl_only_class_or_union_type): Declare new function. * src/abg-ir.cc (is_pointer_to_decl_only_class_or_union_type) (is_reference_to_decl_only_class_or_union_type) (is_typedef_to_decl_only_class_or_union_type): Remove definitions. (is_typedef_ptr_or_ref_to_decl_only_class_or_union_type): Define new function. (is_non_canonicalized_type): Change the invocation of is_declaration_only_class_or_union_type to make it look through decl-only types. Use is_typedef_ptr_or_ref_to_decl_only_class_or_union_type in lieu of is_{pointer,reference,typedef}_to_decl_only_class_or_union_type that got removed. (method_decl::set_linkage_name): Remove the mapping between the method and the old linkage name, only if the old name is different from the new name. Duh. * tests/data/test-annotate/libtest23.so.abi: Adjust. * tests/data/test-annotate/test15-pr18892.so.abi: Likewise. * tests/data/test-annotate/test17-pr19027.so.abi: Likewise. * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise. * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise. * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise. * tests/data/test-annotate/test21-pr19092.so.abi: Likewise. * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi: Likewise. * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise. * tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Likewise. * tests/data/test-read-dwarf/libtest23.so.abi: Likewise. * tests/data/test-read-dwarf/test-libaaudio.so.abi: Likewise. * tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise. * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise. * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise. * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise. * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise. * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise. * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise. * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise. * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise. * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise. * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise. * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise. * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise. Signed-off-by: Dodji Seketeli Applied to master. --- include/abg-fwd.h | 8 +- src/abg-ir.cc | 68 +- tests/data/test-annotate/libtest23.so.abi | 363 +- .../data/test-annotate/test15-pr18892.so.abi | 55 - .../data/test-annotate/test17-pr19027.so.abi | 934 +- ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 5832 +-- ...19-pr19023-libtcmalloc_and_profiler.so.abi | 7483 ++-- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 7566 ++-- .../data/test-annotate/test21-pr19092.so.abi | 88 +- .../PR22015-libboost_iostreams.so.abi | 682 +- .../test-read-dwarf/PR22122-libftdc.so.abi | 13186 +++---- .../data/test-read-dwarf/PR25007-sdhci.ko.abi | 8778 ++--- tests/data/test-read-dwarf/libtest23.so.abi | 358 +- .../test-read-dwarf/test-libaaudio.so.abi | 4 +- .../test-read-dwarf/test-libandroid.so.abi | 1544 +- .../test-read-dwarf/test10-pr18818-gcc.so.abi | 1391 +- .../test-read-dwarf/test11-pr18828.so.abi | 11160 +++--- .../test-read-dwarf/test12-pr18844.so.abi | 23647 ++++++------ .../test-read-dwarf/test15-pr18892.so.abi | 42 - .../test-read-dwarf/test16-pr18904.so.abi | 15271 ++++---- .../test-read-dwarf/test17-pr19027.so.abi | 894 +- ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 5738 +-- ...19-pr19023-libtcmalloc_and_profiler.so.abi | 7239 ++-- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 7277 ++-- .../test-read-dwarf/test21-pr19092.so.abi | 82 +- .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 31278 ++++++++-------- .../test9-pr18818-clang.so.abi | 2691 +- 27 files changed, 76386 insertions(+), 77273 deletions(-) The file is too large for the mailing list so I am attaching it gzipped.