mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
ZAM support for keeping "assert" statements
This commit is contained in:
parent
a328185a8f
commit
908e8a3a27
8 changed files with 113 additions and 17 deletions
|
@ -287,6 +287,21 @@ UDs UseDefs::PropagateUDs(const Stmt* s, UDs succ_UDs, const Stmt* succ_stmt, bo
|
|||
return CreateUDs(s, uds);
|
||||
}
|
||||
|
||||
case STMT_ASSERT: {
|
||||
auto a = s->AsAssertStmt();
|
||||
auto e = a->StmtExpr();
|
||||
|
||||
if ( auto msg = a->Msg().get() ) {
|
||||
succ_UDs = UD_Union(succ_UDs, ExprUDs(msg));
|
||||
if ( auto msg_setup_stmt = a->MsgSetupStmt().get() ) {
|
||||
succ_UDs = PropagateUDs(msg_setup_stmt, succ_UDs, succ_stmt, second_pass);
|
||||
succ_stmt = msg_setup_stmt;
|
||||
}
|
||||
}
|
||||
|
||||
return CreateUDs(s, UD_Union(succ_UDs, ExprUDs(e)));
|
||||
}
|
||||
|
||||
case STMT_SWITCH: {
|
||||
auto sw_UDs = std::make_shared<UseDefSet>();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue