File tree Expand file tree Collapse file tree 3 files changed +2
-10
lines changed Expand file tree Collapse file tree 3 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -2385,12 +2385,8 @@ class VarDeclUsageChecker : public ASTWalker {
2385
2385
}
2386
2386
}
2387
2387
2388
- if (afd->isBodyTypeChecked ()) {
2389
- // FIXME: We don't actually need captures here anymore, but this happens
2390
- // to be the place where they get computed. Move this somewhere else.
2391
- TypeChecker::computeCaptures (afd);
2388
+ if (afd->isBodyTypeChecked ())
2392
2389
return true ;
2393
- }
2394
2390
2395
2391
// Don't walk into a body that has not yet been type checked. This should
2396
2392
// only occur for top-level code.
Original file line number Diff line number Diff line change @@ -1688,6 +1688,7 @@ static Type getFunctionBuilderType(FuncDecl *FD) {
1688
1688
bool TypeChecker::typeCheckAbstractFunctionBody (AbstractFunctionDecl *AFD) {
1689
1689
auto res = TypeChecker::typeCheckAbstractFunctionBodyUntil (AFD, SourceLoc ());
1690
1690
TypeChecker::checkFunctionErrorHandling (AFD);
1691
+ TypeChecker::computeCaptures (AFD);
1691
1692
return res;
1692
1693
}
1693
1694
Original file line number Diff line number Diff line change @@ -306,11 +306,6 @@ static void typeCheckDelayedFunctions(SourceFile &SF) {
306
306
} while (currentFunctionIdx < SF.DelayedFunctions .size () ||
307
307
currentSynthesizedDecl < SF.SynthesizedDecls .size ());
308
308
309
-
310
- for (AbstractFunctionDecl *FD : llvm::reverse (SF.DelayedFunctions )) {
311
- TypeChecker::computeCaptures (FD);
312
- }
313
-
314
309
SF.DelayedFunctions .clear ();
315
310
}
316
311
You can’t perform that action at this time.
0 commit comments