mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
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:
commit
a739d47835
6 changed files with 27 additions and 6 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue