Skip to content

Commit 0c6ef58

Browse files
committed
[DeclChecker] Explicitly compute captures for local functions in the decl
checker.
1 parent 456a505 commit 0c6ef58

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Sema/TypeCheckDeclPrimary.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,6 +2362,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
23622362
} else if (FD->getDeclContext()->isLocalContext()) {
23632363
// Check local function bodies right away.
23642364
(void)FD->getTypecheckedBody();
2365+
TypeChecker::computeCaptures(FD);
23652366
} else if (shouldSkipBodyTypechecking(FD)) {
23662367
FD->setBodySkipped(FD->getBodySourceRange());
23672368
} else {

0 commit comments

Comments
 (0)