mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-22 17:52:16 +00:00
ee2d8c9196
* include/abg-ir.h (type_shared_ptr_equal::operator()): Fix thinko in checking for the boolean value of the pointers to types. * src/abg-ir.cc (type_decl::operator==(const decl_base&)): Do not forget to compare the decl_base part of the type too. (type_decl::operator==(const type_base&)): To ease maintenance, re-use the equality operator that takes a decl_base. (scope_type_decl::operator==(const type_base&)): Likewise. (qualified_type_def::operator==(const type_base&)): Likewise. (compare_function_types): New sub-routine to compare function types. It fixes an infinite recursion when comparing two methods of the same class. (function_type::operator==(const type_base&)): Use the new compare_function_types function. (class_decl::operator==(const decl_base&)): Fix a thinko in the first test of the function. Use a dedicated scope for each class section comparison; that way, there won't be any chance to misuse the variables pertaining to a different section. Fix the member function sections; we were mistakenly using the variables for the *data* section there. (class_decl::operator==(const type_base&)): Re-use the operator that takes a decl_base. (class_decl::operator==(const class_decl&)): Don't remove const-ness during the static cast. (class_decl::member_function::operator==(const member_function&)): Do not remove the reference from the static cast. (class_decl::member_class_template::operator==(const member_base&)): Likewise. (type_tparameter::operator==(const template_parameter&)): Likewise. (template_tparameter::operator==(const template_parameter&)): Likewise. (function_tdecl::operator==(const template_decl&)): Likewise. (class_tdecl::operator==(const template_decl&)): Likewise. (class_tdecl::operator==(const class_tdecl&)): Likewise. * tests/data/test-read-write/test12.xml: Update this because the test now correctly considers two type template parameters at the same index as being equivalent. * tests/data/test-read-write/test13.xml: Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
32 lines
1.3 KiB
XML
32 lines
1.3 KiB
XML
<abi-instr version='1.0'>
|
|
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-1'/>
|
|
<namespace-decl name='ns0'>
|
|
<namespace-decl name='ns1'>
|
|
<function-template-decl id='fn-tmpl-id-2'>
|
|
<template-type-parameter id='type-id-3' name='T'/>
|
|
<template-parameter-type-composition>
|
|
<pointer-type-def type-id='type-id-3' id='type-id-4'/>
|
|
</template-parameter-type-composition>
|
|
<template-non-type-parameter type-id='type-id-4' name='U'/>
|
|
<function-decl name='foo' binding='global' size-in-bits='8' alignment-in-bits='8'>
|
|
<parameter type-id='type-id-3' name='first'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</function-template-decl>
|
|
</namespace-decl>
|
|
</namespace-decl>
|
|
<namespace-decl name='ns2'>
|
|
<namespace-decl name='ns3'>
|
|
<namespace-decl name='ns4'>
|
|
<function-template-decl id='fn-tmpl-id-5'>
|
|
<template-type-parameter type-id='type-id-3' name='T'/>
|
|
<function-decl name='bar' binding='global'>
|
|
<parameter type-id='type-id-3' name='first'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</function-template-decl>
|
|
</namespace-decl>
|
|
</namespace-decl>
|
|
</namespace-decl>
|
|
</abi-instr>
|