From 4b29b4626929c3e3dba14692f9d9fe713840e5c9 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Tue, 8 Sep 2015 15:48:13 +0200 Subject: [PATCH] Fix a stupid typo in function sorting code * src/abg-comparison.cc (function_comp::operator()): Fix a typo preventing the proper sorting of function name when their declarator names are equal. Oops. * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust. Signed-off-by: Dodji Seketeli --- src/abg-comparison.cc | 6 ++-- .../test30-pr18904-rvalueref-report0.txt | 36 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc index 28b4ce99..88a258e4 100644 --- a/src/abg-comparison.cc +++ b/src/abg-comparison.cc @@ -14244,7 +14244,7 @@ struct function_comp return fr < sr; fr = f.get_pretty_representation(), - sr = f.get_pretty_representation(); + sr = s.get_pretty_representation(); if (fr != sr) return fr < sr; @@ -14255,9 +14255,9 @@ struct function_comp fr = f.get_linkage_name(); if (s.get_symbol()) - fr = s.get_symbol()->get_id_string(); + sr = s.get_symbol()->get_id_string(); else if (!s.get_linkage_name().empty()) - fr = s.get_linkage_name(); + sr = s.get_linkage_name(); return fr < sr; } diff --git a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt index 38117688..f5953e5f 100644 --- a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt +++ b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt @@ -260,16 +260,16 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'method void __gnu_cxx::__aligned_membuf::__aligned_membuf()' [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' [A] 'method DynLib* __gnu_cxx::__aligned_membuf::_M_ptr()' - [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' [A] 'method void __gnu_cxx::__aligned_membuf::_M_addr()' - [A] 'method const MyoTable* __gnu_cxx::__aligned_membuf::_M_ptr()' + [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' [A] 'method MyoTable* __gnu_cxx::__aligned_membuf::_M_ptr()' + [A] 'method const MyoTable* __gnu_cxx::__aligned_membuf::_M_ptr()' [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' [A] 'method PersistData* __gnu_cxx::__aligned_membuf::_M_ptr()' [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' [A] 'method PtrData** __gnu_cxx::__aligned_membuf::_M_ptr()' - [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' [A] 'method void __gnu_cxx::__aligned_membuf::_M_addr()' + [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' [A] 'method PtrData* __gnu_cxx::__aligned_membuf::_M_ptr()' [A] 'method const PtrData* __gnu_cxx::__aligned_membuf::_M_ptr()' [A] 'method void __gnu_cxx::__aligned_membuf::__aligned_membuf()' @@ -277,12 +277,12 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'method TargetImage* __gnu_cxx::__aligned_membuf::_M_ptr()' [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' [A] 'method char** __gnu_cxx::__aligned_membuf::_M_ptr()' - [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' [A] 'method void __gnu_cxx::__aligned_membuf::_M_addr()' - [A] 'method coibuffer** __gnu_cxx::__aligned_membuf::_M_ptr()' + [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' [A] 'method coibuffer* const* __gnu_cxx::__aligned_membuf::_M_ptr()' - [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' + [A] 'method coibuffer** __gnu_cxx::__aligned_membuf::_M_ptr()' [A] 'method void __gnu_cxx::__aligned_membuf::_M_addr()' + [A] 'method void* __gnu_cxx::__aligned_membuf::_M_addr()' [A] 'method const long unsigned int* __gnu_cxx::__aligned_membuf::_M_ptr()' [A] 'method long unsigned int* __gnu_cxx::__aligned_membuf::_M_ptr()' [A] 'method void __gnu_cxx::__aligned_membuf >::_M_addr()' @@ -290,8 +290,8 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'method const std::pair* __gnu_cxx::__aligned_membuf >::_M_ptr()' [A] 'method std::pair* __gnu_cxx::__aligned_membuf >::_M_ptr()' [A] 'method void __gnu_cxx::__aligned_membuf >::__aligned_membuf()' - [A] 'method void* __gnu_cxx::__aligned_membuf >::_M_addr()' [A] 'method void __gnu_cxx::__aligned_membuf >::_M_addr()' + [A] 'method void* __gnu_cxx::__aligned_membuf >::_M_addr()' [A] 'method const std::pair* __gnu_cxx::__aligned_membuf >::_M_ptr()' [A] 'method std::pair* __gnu_cxx::__aligned_membuf >::_M_ptr()' [A] 'method void __gnu_cxx::__aligned_membuf >::__aligned_membuf()' @@ -427,8 +427,8 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'function void* operator new(std::size_t, void*)' [A] 'method void std::_Base_bitset<16ul>::_Base_bitset()' [A] 'method void std::_Base_bitset<16ul>::_M_do_reset()' - [A] 'method std::_Base_bitset<16ul>::_WordT& std::_Base_bitset<16ul>::_M_getword(std::size_t)' [A] 'method std::_Base_bitset<16ul>::_WordT std::_Base_bitset<16ul>::_M_getword(std::size_t)' + [A] 'method std::_Base_bitset<16ul>::_WordT& std::_Base_bitset<16ul>::_M_getword(std::size_t)' [A] 'method std::_Base_bitset<16ul>::_WordT std::_Base_bitset<16ul>::_S_maskbit()' [A] 'method std::size_t std::_Base_bitset<16ul>::_S_whichbit()' [A] 'method std::size_t std::_Base_bitset<16ul>::_S_whichword()' @@ -490,16 +490,16 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'method std::_List_iterator::_Self& std::_List_iterator::operator++()' [A] 'method void std::_List_iterator::_List_iterator(std::__detail::_List_node_base*)' [A] 'method DynLib* std::_List_node::_M_valptr()' - [A] 'method const MyoTable* std::_List_node::_M_valptr()' [A] 'method MyoTable* std::_List_node::_M_valptr()' + [A] 'method const MyoTable* std::_List_node::_M_valptr()' [A] 'method PersistData* std::_List_node::_M_valptr()' [A] 'method PtrData** std::_List_node::_M_valptr()' [A] 'method TargetImage* std::_List_node::_M_valptr()' [A] 'method char** std::_List_node::_M_valptr()' [A] 'method coibuffer* const* std::_List_node::_M_valptr()' [A] 'method coibuffer** std::_List_node::_M_valptr()' - [A] 'method long unsigned int* std::_List_node::_M_valptr()' [A] 'method const long unsigned int* std::_List_node::_M_valptr()' + [A] 'method long unsigned int* std::_List_node::_M_valptr()' [A] 'method std::_Rb_tree, std::less, std::allocator >::_Alloc_node::_Alloc_node(std::_Rb_tree, std::less, std::allocator >&)' [A] 'method std::_Rb_tree, std::less, std::allocator >::_Link_type std::_Rb_tree, std::less, std::allocator >::_Alloc_node::operator()(AutoData&)' [A] 'method std::_Rb_tree, std::less, std::allocator >::_Link_type std::_Rb_tree, std::less, std::allocator >::_M_begin()' @@ -530,8 +530,8 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'method std::_Rb_tree, std::less, std::allocator >::const_reference std::_Rb_tree, std::less, std::allocator >::_S_value()' [A] 'method std::_Rb_tree, std::less, std::allocator >::iterator std::_Rb_tree, std::less, std::allocator >::begin()' [A] 'method void std::_Rb_tree, std::less, std::allocator >::clear()' - [A] 'method std::_Rb_tree, std::less, std::allocator >::iterator std::_Rb_tree, std::less, std::allocator >::end()' [A] 'method std::_Rb_tree, std::less, std::allocator >::const_iterator std::_Rb_tree, std::less, std::allocator >::end()' + [A] 'method std::_Rb_tree, std::less, std::allocator >::iterator std::_Rb_tree, std::less, std::allocator >::end()' [A] 'method std::_Rb_tree, std::less, std::allocator >::iterator std::_Rb_tree, std::less, std::allocator >::erase(std::_Rb_tree, std::less, std::allocator >::const_iterator)' [A] 'method std::_Rb_tree, std::less, std::allocator >::iterator std::_Rb_tree, std::less, std::allocator >::erase(std::_Rb_tree, std::less, std::allocator >::const_iterator, std::_Rb_tree, std::less, std::allocator >::const_iterator)' [A] 'method std::_Rb_tree, std::less, std::allocator >::iterator std::_Rb_tree, std::less, std::allocator >::find(const AutoData&)' @@ -566,8 +566,8 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'method std::_Rb_tree, std::less, std::allocator >::const_reference std::_Rb_tree, std::less, std::allocator >::_S_value()' [A] 'method std::_Rb_tree, std::less, std::allocator >::iterator std::_Rb_tree, std::less, std::allocator >::begin()' [A] 'method void std::_Rb_tree, std::less, std::allocator >::clear()' - [A] 'method std::_Rb_tree, std::less, std::allocator >::iterator std::_Rb_tree, std::less, std::allocator >::end()' [A] 'method std::_Rb_tree, std::less, std::allocator >::const_iterator std::_Rb_tree, std::less, std::allocator >::end()' + [A] 'method std::_Rb_tree, std::less, std::allocator >::iterator std::_Rb_tree, std::less, std::allocator >::end()' [A] 'method std::_Rb_tree, std::less, std::allocator >::size_type std::_Rb_tree, std::less, std::allocator >::erase(const PtrData&)' [A] 'method std::_Rb_tree, std::less, std::allocator >::iterator std::_Rb_tree, std::less, std::allocator >::erase(std::_Rb_tree, std::less, std::allocator >::const_iterator)' [A] 'method std::_Rb_tree, std::less, std::allocator >::iterator std::_Rb_tree, std::less, std::allocator >::erase(std::_Rb_tree, std::less, std::allocator >::const_iterator, std::_Rb_tree, std::less, std::allocator >::const_iterator)' @@ -591,8 +591,8 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Base_ptr std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_end()' [A] 'method void std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase(std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Link_type)' [A] 'method void std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase_aux(std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator)' - [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Node_allocator& std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_get_Node_allocator()' [A] 'method const std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Node_allocator& std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_get_Node_allocator()' + [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Node_allocator& std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_get_Node_allocator()' [A] 'method std::pair std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_get_insert_hint_unique_pos(std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator, const std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::key_type&)' [A] 'method std::pair std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_get_insert_unique_pos(const std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::key_type&)' [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Link_type std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_get_node()' @@ -601,8 +601,8 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::iterator std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_lower_bound(std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Link_type, std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Base_ptr, const long unsigned int&)' [A] 'method void std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_put_node(std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Link_type)' [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Base_ptr& std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_rightmost()' - [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Const_Base_ptr std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_root()' [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Base_ptr& std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_root()' + [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Const_Base_ptr std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_root()' [A] 'method void std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Rb_tree()' [A] 'method void std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Rb_tree(const std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >&)' [A] 'method void std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Rb_tree_impl, true>::_M_initialize()' @@ -614,8 +614,8 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Link_type std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_left()' [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Base_ptr std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_maximum()' [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Base_ptr std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_minimum()' - [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Link_type std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_right()' [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Const_Link_type std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_right()' + [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Link_type std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_right()' [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_reference std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_value()' [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_reference std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_value()' [A] 'method std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::iterator std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::begin()' @@ -697,14 +697,14 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'method std::_Rb_tree_iterator >::_Self& std::_Rb_tree_iterator >::operator--()' [A] 'method std::_Rb_tree_iterator >::pointer std::_Rb_tree_iterator >::operator->()' [A] 'method bool std::_Rb_tree_iterator >::operator==(const std::_Rb_tree_iterator >::_Self&)' - [A] 'method const AutoData* std::_Rb_tree_node::_M_valptr()' [A] 'method AutoData* std::_Rb_tree_node::_M_valptr()' + [A] 'method const AutoData* std::_Rb_tree_node::_M_valptr()' [A] 'method PtrData* std::_Rb_tree_node::_M_valptr()' [A] 'method const PtrData* std::_Rb_tree_node::_M_valptr()' [A] 'method const std::pair* std::_Rb_tree_node >::_M_valptr()' [A] 'method std::pair* std::_Rb_tree_node >::_M_valptr()' - [A] 'method std::pair* std::_Rb_tree_node >::_M_valptr()' [A] 'method const std::pair* std::_Rb_tree_node >::_M_valptr()' + [A] 'method std::pair* std::_Rb_tree_node >::_M_valptr()' [A] 'method std::_Rb_tree_node_base::_Base_ptr std::_Rb_tree_node_base::_S_maximum()' [A] 'method std::_Rb_tree_node_base::_Base_ptr std::_Rb_tree_node_base::_S_minimum()' [A] 'method std::pair::first_type& std::_Select1st >::operator()(const std::pair&)' @@ -889,8 +889,8 @@ Variable symbols changes summary: 22 Removed, 4 Added variable symbols not refer [A] 'method void std::__cxx11::list >::_M_insert(std::__cxx11::list >::iterator, coibuffer* const&)' [A] 'method std::__cxx11::list >::const_iterator std::__cxx11::list >::begin()' [A] 'method std::__cxx11::list >::iterator std::__cxx11::list >::begin()' - [A] 'method std::__cxx11::list >::iterator std::__cxx11::list >::end()' [A] 'method std::__cxx11::list >::const_iterator std::__cxx11::list >::end()' + [A] 'method std::__cxx11::list >::iterator std::__cxx11::list >::end()' [A] 'method void std::__cxx11::list >::list()' [A] 'method void std::__cxx11::list >::push_back(const std::__cxx11::list >::value_type&)' [A] 'method std::__cxx11::list >::size_type std::__cxx11::list >::size()'