We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5ee4928 + 7704930 commit dc668b6Copy full SHA for dc668b6
lib/Sema/TypeChecker.cpp
@@ -54,7 +54,9 @@ using namespace swift;
54
TypeChecker &TypeChecker::createForContext(ASTContext &ctx) {
55
assert(!ctx.getLegacyGlobalTypeChecker() &&
56
"Cannot install more than one instance of the global type checker!");
57
- ctx.installGlobalTypeChecker(new TypeChecker(ctx));
+ auto *TC = new TypeChecker(ctx);
58
+ ctx.installGlobalTypeChecker(TC);
59
+ ctx.addDestructorCleanup(TC);
60
return *ctx.getLegacyGlobalTypeChecker();
61
}
62
0 commit comments