Skip to content

Commit 92f2aca

Browse files
committed
[IDE] Remove redundant extension binding logic
I missed this in my previous patch that moved extension binding until after we've mutated the AST for IDE inspection, this ad-hoc extension binding logic is no longer necessary.
1 parent 43fa4a4 commit 92f2aca

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

lib/IDE/CodeCompletion.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -175,25 +175,6 @@ class CodeCompletionCallbacksImpl : public CodeCompletionCallbacks,
175175

176176
/// \returns true on success, false on failure.
177177
bool typecheckParsedType() {
178-
// If the type appeared inside an extension, make sure that extension has
179-
// been bound.
180-
auto SF = CurDeclContext->getParentSourceFile();
181-
auto visitTopLevelDecl = [&](Decl *D) {
182-
if (auto ED = dyn_cast<ExtensionDecl>(D)) {
183-
if (ED->getSourceRange().contains(ParsedTypeLoc.getLoc())) {
184-
ED->computeExtendedNominal();
185-
}
186-
}
187-
};
188-
for (auto item : SF->getTopLevelItems()) {
189-
if (auto D = item.dyn_cast<Decl *>()) {
190-
visitTopLevelDecl(D);
191-
}
192-
}
193-
for (auto *D : SF->getHoistedDecls()) {
194-
visitTopLevelDecl(D);
195-
}
196-
197178
assert(ParsedTypeLoc.getTypeRepr() && "should have a TypeRepr");
198179
if (ParsedTypeLoc.wasValidated() && !ParsedTypeLoc.isError()) {
199180
return true;

0 commit comments

Comments
 (0)