mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Report 'key.reusingastcontext' in completion like requests
'TypeContextInfo' and 'ConformingMethodList'
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user