[SourceKit] Report 'key.reusingastcontext' in completion like requests

'TypeContextInfo' and 'ConformingMethodList'
This commit is contained in:
Rintaro Ishizaki
2020-06-29 09:59:39 -07:00
parent bbec1ebfbf
commit 8307c6a95c
12 changed files with 371 additions and 5 deletions

View File

@@ -44,6 +44,7 @@ static bool swiftConformingMethodListImpl(
auto *SF = CI.getCodeCompletionFile();
performCodeCompletionSecondPass(*SF, *callbacksFactory);
Consumer.setReusingASTContext(reusingASTContext);
});
}
@@ -68,7 +69,7 @@ void SwiftLangSupport::getConformingMethodList(
: SKConsumer(SKConsumer) {}
/// Convert an IDE result to a SK result and send it to \c SKConsumer .
void handleResult(const ide::ConformingMethodListResult &Result) {
void handleResult(const ide::ConformingMethodListResult &Result) override {
SmallString<512> SS;
llvm::raw_svector_ostream OS(SS);
@@ -172,6 +173,10 @@ void SwiftLangSupport::getConformingMethodList(
SKConsumer.handleResult(SKResult);
}
void setReusingASTContext(bool flag) override {
SKConsumer.setReusingASTContext(flag);
}
} Consumer(SKConsumer);
if (!swiftConformingMethodListImpl(*this, UnresolvedInputFile, Offset, Args,