diff --git a/src/abg-ir.cc b/src/abg-ir.cc index a66d55e9..358a7a26 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -4065,13 +4065,13 @@ equals(const decl_base& l, const decl_base& r, change_kind* k) /// If both of the current decls have an anonymous scope then let's /// compare their name component by component by properly handling - /// anonyous scopes. That's the slow path. + /// anonymous scopes. That's the slow path. /// /// Otherwise, let's just compare their name, the obvious way. /// That's the fast path because in that case the names are /// interned_string and comparing them is much faster. - bool decls_are_different = (ln != rn); - if (decls_are_different + bool decls_are_same = (ln == rn); + if (!decls_are_same && l.get_is_anonymous() && !l.get_has_anonymous_parent() && r.get_is_anonymous() @@ -4079,17 +4079,17 @@ equals(const decl_base& l, const decl_base& r, change_kind* k) // Both decls are anonymous and their scope are *NOT* anonymous. // So we consider the decls to have equivalent names (both // anonymous, remember). We are still in the fast path here. - decls_are_different = false; + decls_are_same = true; - if (decls_are_different + if (!decls_are_same && l.get_has_anonymous_parent() && r.get_has_anonymous_parent()) // This is the slow path as we are comparing the decl qualified // names component by component, properly handling anonymous // scopes. - decls_are_different = tools_utils::decl_names_equal(ln, rn); + decls_are_same = tools_utils::decl_names_equal(ln, rn); - if (decls_are_different) + if (!decls_are_same) { result = false; if (k) diff --git a/tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt b/tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt index dc1dff32..71df361e 100644 --- a/tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt +++ b/tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt @@ -130,10 +130,6 @@ Variables changes summary: 0 Removed, 0 Changed, 3 Added variables type of 'union {lttng_event_perf_counter_ctx perf_counter; struct {char* provider_name; char* ctx_name;} app_ctx; char padding[288];} lttng_event_context::u' changed: type name changed from '__anonymous_union__4' to '__anonymous_union__5' type size hasn't changed - 3 data member changes: - name of '__anonymous_union__4::app_ctx' changed to '__anonymous_union__5::app_ctx' - name of '__anonymous_union__4::padding' changed to '__anonymous_union__5::padding' - name of '__anonymous_union__4::perf_counter' changed to '__anonymous_union__5::perf_counter' type changed from: union {lttng_event_perf_counter_ctx perf_counter; struct {char* provider_name; char* ctx_name;} app_ctx; char padding[288];} to: diff --git a/tests/data/test-diff-filter/test33-report-0.txt b/tests/data/test-diff-filter/test33-report-0.txt index 433f9508..e69de29b 100644 --- a/tests/data/test-diff-filter/test33-report-0.txt +++ b/tests/data/test-diff-filter/test33-report-0.txt @@ -1,3 +0,0 @@ -Functions changes summary: 0 Removed, 0 Changed (16 filtered out), 0 Added functions -Variables changes summary: 0 Removed, 0 Changed, 0 Added variable - diff --git a/tests/data/test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64-multiple-sym-vers-report-0.txt b/tests/data/test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64-multiple-sym-vers-report-0.txt index 8ce5aa3c..9d1f078d 100644 --- a/tests/data/test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64-multiple-sym-vers-report-0.txt +++ b/tests/data/test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64-multiple-sym-vers-report-0.txt @@ -1,5 +1,5 @@ ================ changes of 'libdw-0.170.so'=============== - Functions changes summary: 0 Removed, 0 Changed (178 filtered out), 4 Added functions + Functions changes summary: 0 Removed, 0 Changed (175 filtered out), 4 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 4 Added functions: diff --git a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt index c1aff1c7..a0bfc761 100644 --- a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt +++ b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt @@ -630,7 +630,7 @@ in pointed to type 'typedef SpiceServer' at spice-server.h:38:1: underlying type 'struct RedsState' at reds-private.h:127:1 changed: type size hasn't changed - 5 data member changes (2 filtered): + 5 data member changes (1 filtered): type of 'SpiceWatch* RedsState::listen_watch' changed: pointed to type 'typedef SpiceWatch' changed at spice.h:61:1, as reported earlier type of 'SpiceWatch* RedsState::secure_listen_watch' changed: diff --git a/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi b/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi index c4bca89a..340bdd5e 100644 --- a/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi +++ b/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi @@ -6313,7 +6313,7 @@ - + @@ -6348,7 +6348,7 @@ - + @@ -6469,24 +6469,6 @@ - - - - - - - - - - - - - - - - - - @@ -6526,17 +6508,17 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -6548,151 +6530,151 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - + - + - - + + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - + @@ -6705,117 +6687,117 @@ - + - - - - - - + + + + + + + - - - - + + + - + - + - - + + - - + + - + - + - + - - + + - + - + - - + + - + - - + + - + - + - + - + - - + + @@ -6824,7 +6806,7 @@ - + @@ -6833,18 +6815,18 @@ - + - + - + - + @@ -6856,19 +6838,19 @@ - + - + - + - + - + @@ -6880,7 +6862,7 @@ - + @@ -6901,7 +6883,7 @@ - + @@ -6949,13 +6931,13 @@ - + - +