[PATCH 06/11] Support incomplete enums in core and diff code.
Dodji Seketeli
dodji@seketeli.org
Wed Jul 8 15:30:16 GMT 2020
Giuliano Procida <gprocida@google.com> a écrit:
[...]
>> +/// If a decl is decl-only get its definition. Otherwise, just return nil.
>> +///
>> +/// @param d the decl to consider.
>> +///
>> +/// @return either the definition of the decl, or nil.
>> +decl_base_sptr
>> +look_through_decl_only(const decl_base& d)
>> +{
>> + decl_base_sptr decl;
>> + if (d.get_is_declaration_only())
>> + decl = d.get_definition_of_declaration();
>> +
>> + if (!decl)
>> + return decl;
>> +
>> + while (decl->get_is_declaration_only()
>> + && decl->get_definition_of_declaration())
>> + decl = decl->get_definition_of_declaration();
>> +
>> + ABG_ASSERT(decl);
>
> The assert is still here (and redundant - to be honest, the compiler
> may be able to work this out for itself).
Pff, right. I removed it now, thanks.
> I didn't spot anything else, so all good.
Thanks. I've just applied the series to master then.
Cheers,
--
Dodji
More information about the Libabigail
mailing list