abitidy: strip naming-typedef-id from more elements
Upstream libabigail is adding these to enum-decl and presumably,
union-decl may follow.
Bug: 194371728
Change-Id: I67fc680c7103d6b17e240d171ed1cbef6ddf6c12
Signed-off-by: Giuliano Procida <gprocida@google.com>
diff --git a/tools/abitidy.cc b/tools/abitidy.cc
index ed07cbd..201c39e 100644
--- a/tools/abitidy.cc
+++ b/tools/abitidy.cc
@@ -373,7 +373,10 @@
{
if (node->type != XML_ELEMENT_NODE)
return;
- if (strcmp(from_libxml(node->name), "class-decl") == 0)
+ const char* node_name = from_libxml(node->name);
+ if (strcmp(node_name, "class-decl") == 0
+ || strcmp(node_name, "union-decl") == 0
+ || strcmp(node_name, "enum-decl") == 0)
set_attribute(node, "naming-typedef-id", {});
for (xmlNodePtr child : get_children(node))
discard_naming_typedefs(child);