mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CodeCompletion] Avoid typechecking all toplevel decls in the current file
- Use `performParseAndResolveImportsOnly()` to invoke the frontend - Do `bindExtensions()` in `ide::typeCheckContextUntil()` - Typecheck preceding `TopLevelCodeDecl`s only if the compleiton is in a `TopLevelCodeDecl` - Other related tweaks rdar://problem/56636747
This commit is contained in:
@@ -212,7 +212,7 @@ static bool swiftCodeCompleteImpl(
|
||||
SwiftConsumer.setContext(&CI.getASTContext(), &Invocation,
|
||||
&CompletionContext);
|
||||
registerIDETypeCheckRequestFunctions(CI.getASTContext().evaluator);
|
||||
CI.performSema();
|
||||
CI.performParseAndResolveImportsOnly();
|
||||
SwiftConsumer.clearContext();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user