[15/16] ir: Fix qualification as non-confirmed propagated canonical types
Commit Message
Hello,
While looking at something else, there are some types considered
having "non-confirmed propagated canonical type", even though those
types are not even canonical-type-propagated. This patch fixes that.
That doesn't have any visible impact, but it's definitely more
correct.
* src/abg-ir.cc (return_comparison_result): A type that doesn't
have propagated canonical type can't be considered having
"non-confirmed propagated canonical type".
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
src/abg-ir.cc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
@@ -1041,7 +1041,10 @@ return_comparison_result(T& l, T& r, bool value,
// eventually fails.
env.priv_->add_to_types_with_non_confirmed_propagated_ct(is_type(&r));
}
- else if (value == true && env.priv_->right_type_comp_operands_.empty())
+ else if (value == true
+ && env.priv_->right_type_comp_operands_.empty()
+ && is_type(&r)->priv_->canonical_type_propagated()
+ && !is_type(&r)->priv_->propagated_canonical_type_confirmed())
{
// The type provided in the 'r' argument is the type that is
// being canonicalized; 'r' is not a mere subtype being
@@ -1052,7 +1055,9 @@ return_comparison_result(T& l, T& r, bool value,
// "canonical type propagation" optimization.
env.priv_->confirm_ct_propagation(&r);
}
- else if (value == true)
+ else if (value == true
+ && is_type(&r)->priv_->canonical_type_propagated()
+ && !is_type(&r)->priv_->propagated_canonical_type_confirmed())
// In any other case, we are not sure if propagated types
// should be confirmed yet. So let's mark them as such.
env.priv_->add_to_types_with_non_confirmed_propagated_ct(is_type(&r));