Fix clang-tidy bugprone-branch-clone warnings

This commit is contained in:
Tim Wojtulewicz 2025-04-15 18:48:57 -07:00
parent 92854e95d3
commit dbecfb5a2a
32 changed files with 132 additions and 247 deletions

View file

@ -481,10 +481,8 @@ bool Reducer::ExprValid(const ID* id, const Expr* e1, const Expr* e2) const {
auto aggr = e1->GetOp1();
auto aggr_t = aggr->GetType();
if ( pfs->HasSideEffects(SideEffectsOp::READ, aggr_t) )
has_side_effects = true;
else if ( aggr_t->Tag() == TYPE_TABLE && pfs->IsTableWithDefaultAggr(aggr_t.get()) )
if ( (pfs->HasSideEffects(SideEffectsOp::READ, aggr_t)) ||
(aggr_t->Tag() == TYPE_TABLE && pfs->IsTableWithDefaultAggr(aggr_t.get())) )
has_side_effects = true;
}