[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:
Rintaro Ishizaki
2019-10-30 17:13:16 -07:00
parent 9203080c0e
commit 2564a6e494
13 changed files with 109 additions and 39 deletions

View File

@@ -82,7 +82,7 @@ static bool swiftConformingMethodListImpl(
return true;
}
registerIDERequestFunctions(CI.getASTContext().evaluator);
CI.performSema();
CI.performParseAndResolveImportsOnly();
return true;
}