Merge remote-tracking branch 'origin/topic/vern/add-del-void-exprs'

* origin/topic/vern/add-del-void-exprs:
  crash fixes for constructs that expect add/delete expressions to return values
This commit is contained in:
Evan Typanski 2025-07-11 12:58:06 -04:00
commit a739d47835
6 changed files with 27 additions and 6 deletions

View file

@ -730,9 +730,10 @@ ExprPtr AddExpr::BuildSub(const ExprPtr& op1, const ExprPtr& op2) {
}
ExprPtr AggrAddDelExpr::Reduce(Reducer* c, StmtPtr& red_stmt) {
if ( type )
return UnaryExpr::Reduce(c, red_stmt);
// In the future, if we use add/delete for list operations or such,
// then the following becomes germane.
// if ( type )
// return UnaryExpr::Reduce(c, red_stmt);
if ( c->Optimizing() )
op = c->UpdateExpr(op);