diff mbox series

[applied] writer: Don't forget that a naming typedef is referenced

Message ID 87sfwybtg3.fsf@redhat.com
State New
Headers show
Series [applied] writer: Don't forget that a naming typedef is referenced | expand

Commit Message

Dodji Seketeli Oct. 18, 2021, 8:58 a.m. UTC
Hello,

While looking into something else, I noticed that when emitting the
'naming-typedef' property of class, the typedef wasn't categorized as
a referenced type.  So sometimes the writer could forget to emit the
naming typedef itself later.  Fixed thus.

	* src/abg-writer.cc (write_naming_typedef): Notice that the naming
	typedef is referenced.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
 src/abg-writer.cc | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/src/abg-writer.cc b/src/abg-writer.cc
index 6f2fee16..693f99c6 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -1887,6 +1887,7 @@  write_naming_typedef(const decl_base_sptr& decl, write_context& ctxt)
     {
       string id = ctxt.get_id_for_type(typedef_type);
       o << " naming-typedef-id='" << id << "'";
+      ctxt.record_type_as_referenced(typedef_type);
     }
 }