removed deprecated capture-by-reference closures

This commit is contained in:
Vern Paxson 2022-06-17 15:55:43 -07:00
parent 5ccba54335
commit 5a0a88526e
20 changed files with 59 additions and 1220 deletions

View file

@ -745,16 +745,12 @@ TraversalCode OuterIDBindingFinder::PreStmt(const Stmt* stmt)
if ( stmt->Tag() != STMT_WHEN )
return TC_CONTINUE;
auto ws = static_cast<const WhenStmt*>(stmt);
auto lambda = ws->Info()->Lambda();
if ( ! lambda )
// Old-style semantics.
return TC_CONTINUE;
// The semantics of identifiers for the "when" statement are those
// of the lambda it's transformed into.
lambda->Traverse(this);
auto ws = static_cast<const WhenStmt*>(stmt);
ws->Info()->Lambda()->Traverse(this);
return TC_ABORTSTMT;
}