tracking of when statements/expressions occur in a "when" context

This commit is contained in:
Vern Paxson 2022-05-12 13:45:45 -07:00
parent 5a32e58e04
commit 9ada7ac4e7
6 changed files with 45 additions and 17 deletions

View file

@ -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: