comparison: Fix index error when interpreting scope comparison
authorDodji Seketeli <dodji@redhat.com>
Wed, 19 Apr 2023 14:24:05 +0000 (16:24 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 25 Apr 2023 13:50:26 +0000 (15:50 +0200)
commit2078e2784900a4a9256364a752d653f9aa6e807c
tree38f3b1e4225f6e3f963900acf59783e4972b492e
parent7d71d4eaec260d6c3fab1cab8e373bff7714cab9
comparison: Fix index error when interpreting scope comparison

While looking at something else, I noticed a thinko in the
code in scope_diff::ensure_lookup_tables_populated that interprets the
result of the diffing algorithm on the decls of a given scope.  Fixed
thus.

* src/abg-comparison.cc
(scope_diff::ensure_lookup_tables_populated): Use the proper index
to address the deleted decl.  Also, use the range-based for syntax
in the enclosing for-loop for more clarity.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-comparison.cc