mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
fix for AST optimization altering top-level body statement
This commit is contained in:
parent
22af54dda2
commit
143d306883
3 changed files with 17 additions and 5 deletions
|
@ -37,7 +37,7 @@ void UseDefs::Analyze()
|
|||
(void) PropagateUDs(body, nullptr, nullptr, false);
|
||||
}
|
||||
|
||||
void UseDefs::RemoveUnused()
|
||||
StmtPtr UseDefs::RemoveUnused()
|
||||
{
|
||||
int iter = 0;
|
||||
while ( RemoveUnused(++iter) )
|
||||
|
@ -48,6 +48,8 @@ void UseDefs::RemoveUnused()
|
|||
if ( reporter->Errors() > 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
void UseDefs::Dump()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue