[applied] reader: Make reader::get_scope_for_node handle subranges at array scope.

Message ID 87h6tul3cz.fsf@redhat.com
State New
Headers
Series [applied] reader: Make reader::get_scope_for_node handle subranges at array scope. |

Commit Message

Dodji Seketeli April 5, 2023, 4:07 p.m. UTC
  Hello,

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/src/abg-reader.cc b/src/abg-reader.cc
index 4c2ff529..e1d13296 100644
--- a/src/abg-reader.cc
+++ b/src/abg-reader.cc
@@ -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;