[IDE] Rename CodeCompletion to IDEInspection in cases where the code path no longer exclusively applies to code completion

The code completio infrastructure is also being used for cursor info now, so it should no longer be called code completion.

rdar://103251187
This commit is contained in:
Alex Hoppen
2022-12-12 12:41:26 +01:00
parent d9382b1bdb
commit fe2ae72ad2
61 changed files with 638 additions and 623 deletions

View File

@@ -665,15 +665,15 @@ ArrayRef<SourceFile *> ModuleDecl::getPrimarySourceFiles() const {
return evaluateOrDefault(eval, PrimarySourceFilesRequest{mutableThis}, {});
}
SourceFile *CodeCompletionFileRequest::evaluate(Evaluator &evaluator,
ModuleDecl *mod) const {
SourceFile *IDEInspectionFileRequest::evaluate(Evaluator &evaluator,
ModuleDecl *mod) const {
const auto &SM = mod->getASTContext().SourceMgr;
assert(mod->isMainModule() && "Can only do completion in the main module");
assert(SM.hasCodeCompletionBuffer() && "Not performing code completion?");
assert(SM.hasIDEInspectionTargetBuffer() && "Not in IDE inspection mode?");
for (auto *file : mod->getFiles()) {
auto *SF = dyn_cast<SourceFile>(file);
if (SF && SF->getBufferID() == SM.getCodeCompletionBufferID())
if (SF && SF->getBufferID() == SM.getIDEInspectionTargetBufferID())
return SF;
}
llvm_unreachable("Couldn't find the completion file?");