Skip to content

Commit 6e09a4e

Browse files
committed
[Sema] NFC: Remove shouldWalkIntoClosure
This used to have some logic when multi-statement closures were type-checked differently, it's always true now.
1 parent 9a339d9 commit 6e09a4e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/Sema/TypeCheckAvailability.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3721,10 +3721,8 @@ class ExprAvailabilityWalker : public ASTWalker {
37213721
CE->getResultType(), E->getLoc(), Where);
37223722
}
37233723
if (AbstractClosureExpr *closure = dyn_cast<AbstractClosureExpr>(E)) {
3724-
if (shouldWalkIntoClosure(closure)) {
3725-
walkAbstractClosure(closure);
3726-
return Action::SkipChildren(E);
3727-
}
3724+
walkAbstractClosure(closure);
3725+
return Action::SkipChildren(E);
37283726
}
37293727

37303728
if (auto CE = dyn_cast<ExplicitCastExpr>(E)) {
@@ -3952,10 +3950,6 @@ class ExprAvailabilityWalker : public ASTWalker {
39523950
walkInContext(E->getSubExpr(), accessContext);
39533951
}
39543952

3955-
bool shouldWalkIntoClosure(AbstractClosureExpr *closure) const {
3956-
return true;
3957-
}
3958-
39593953
/// Walk an abstract closure expression, checking for availability
39603954
void walkAbstractClosure(AbstractClosureExpr *closure) {
39613955
// Do the walk with the closure set as the decl context of the 'where'

0 commit comments

Comments
 (0)