]> sourceware.org Git - libabigail.git/commit
writer: Don't forget data members when emitting referenced types
authorDodji Seketeli <dodji@redhat.com>
Thu, 8 Feb 2024 17:06:13 +0000 (18:06 +0100)
committerDodji Seketeli <dodji@redhat.com>
Mon, 12 Feb 2024 16:34:59 +0000 (17:34 +0100)
commit91762ba16be18cec56b75731979369053bd891cb
tree086f9019409de32d8a1505ee212ec5f821f6be42
parentd50fcf10b8cc00f0ebab3fda17160fd37a0b5829
writer: Don't forget data members when emitting referenced types

When emitting a type referenced type in the ABIXML,
write_decl_in_scope just emits markup for the opening (and closing)
tags for the scopes up until the actual referenced type.  Then the
referenced type is emitted.

But then if the referenced type is a member type of a class A, for
instance, the other data members of that class are not emitted.  That
can cause the data members of A to be missing.  Oops.

To fix that, if a scope of the referenced type is itself a type,
write_decl_in_scope now emits the full type.

* src/abg-writer.cc (write_decl_in_scope): If the scope of the
decl to write is a type that was not yet emitted, then emit it in
full.  Otherwise, just do things as we were doing previously.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-writer.cc
This page took 0.031162 seconds and 5 git commands to generate.