[Bug,default/28320] abidw - (non-deterministic) infinite loop in XML writer
Commit Message
https://sourceware.org/bugzilla/show_bug.cgi?id=28320
--- Comment #4 from dodji at redhat dot com ---
Hmmh, actually, this one might be the one to try, rather:
@@ -2356,7 +2356,8 @@ write_translation_unit(write_context& ctxt,
// considered "opaque".
if (class_decl_sptr class_type = is_class_type(t))
if (class_type->get_is_declaration_only()
- && !ctxt.type_is_emitted(class_type))
+ && !ctxt.type_is_emitted(class_type)
+ && !ctxt.decl_only_type_is_emitted(class_type))
write_type(class_type, ctxt,
indent + c.get_xml_element_indent());
continue;
@@ -2420,7 +2421,8 @@ write_translation_unit(write_context& ctxt,
// We handle types which have declarations *and* function
// types here.
type_base_sptr t(*i, noop_deleter());
- if (!ctxt.type_is_emitted(t))
+ if (!ctxt.type_is_emitted(t)
+ && !ctxt.decl_only_type_is_emitted(t))
{
if (decl_base* d = get_type_declaration(*i))
{