mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
fix for ZAM identification of common subexpressions
This commit is contained in:
parent
e0e6c462ce
commit
b0e21b7e64
1 changed files with 7 additions and 6 deletions
|
@ -43,7 +43,7 @@ TraversalCode CSE_ValidityChecker::PreStmt(const Stmt* s) {
|
|||
|
||||
TraversalCode CSE_ValidityChecker::PreExpr(const Expr* e) {
|
||||
if ( e == start_e ) {
|
||||
ASSERT(! have_start_e);
|
||||
if ( ! have_start_e ) {
|
||||
have_start_e = true;
|
||||
|
||||
// Don't analyze the expression, as it's our starting
|
||||
|
@ -51,6 +51,7 @@ TraversalCode CSE_ValidityChecker::PreExpr(const Expr* e) {
|
|||
// with those of any intervening expressions.
|
||||
return TC_CONTINUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ( e == end_e ) {
|
||||
if ( ! have_start_e )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue