reader: Make reader::get_scope_for_node handle subranges at array scope.
authorDodji Seketeli <dodji@redhat.com>
Tue, 4 Apr 2023 09:58:35 +0000 (11:58 +0200)
committerDodji Seketeli <dodji@redhat.com>
Wed, 5 Apr 2023 15:01:48 +0000 (17:01 +0200)
Now that subranges can be standalone types, we need to teach
reader::get_scope_for_node about the fact that subranges can be at
array scope too.

* src/abg-reader.cc (reader::get_scope_for_node): A subrange
at array scope is meant to be in the scope of the array.

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

index 4c2ff5296437a54d890333c5cd579d8d269a08c4..e1d13296f27c58842700729d189aacba52b96ad2 100644 (file)
@@ -1490,7 +1490,8 @@ reader::get_scope_for_node(xmlNodePtr node,
       && (xmlStrEqual(parent->name, BAD_CAST("data-member"))
          || xmlStrEqual(parent->name, BAD_CAST("member-type"))
          || xmlStrEqual(parent->name, BAD_CAST("member-function"))
-         || xmlStrEqual(parent->name, BAD_CAST("member-template"))))
+         || xmlStrEqual(parent->name, BAD_CAST("member-template"))
+         || xmlStrEqual(parent->name, BAD_CAST("array-type-def"))))
     {
       read_access(parent, access);
       parent = parent->parent;