mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
tracking of when statements/expressions occur in a "when" context
This commit is contained in:
parent
5a32e58e04
commit
9ada7ac4e7
6 changed files with 45 additions and 17 deletions
|
@ -129,7 +129,15 @@ TraversalCode ProfileFunc::PreStmt(const Stmt* s)
|
|||
return TC_ABORTSTMT;
|
||||
|
||||
case STMT_WHEN:
|
||||
{
|
||||
++num_when_stmts;
|
||||
|
||||
auto w = s->AsWhenStmt();
|
||||
auto wi = w->Info();
|
||||
auto wl = wi ? wi->Lambda() : nullptr;
|
||||
if ( wl )
|
||||
lambdas.push_back(wl.get());
|
||||
}
|
||||
break;
|
||||
|
||||
case STMT_FOR:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue