[CodeCompletion] Use the arguments to check the equality of the invocation

Checking "selected" properties of CompilerInvocation is hard to keep it
up to date. If the arguments are the same, the invocations are the same.
This commit is contained in:
Rintaro Ishizaki
2019-12-17 13:46:28 -08:00
parent c5b1ada982
commit 0f45267927
6 changed files with 31 additions and 85 deletions

View File

@@ -80,7 +80,7 @@ static bool swiftConformingMethodListImpl(
// Pin completion instance.
auto CompletionInst = Lang.getCompletionInstance();
CompilerInstance *CI = CompletionInst->getCompilerInstance(
Invocation, FileSystem, newBuffer.get(), Offset, Error, &CIDiags);
Invocation, Args, FileSystem, newBuffer.get(), Offset, Error, &CIDiags);
if (!CI)
return false;
SWIFT_DEFER { CI->removeDiagnosticConsumer(&CIDiags); };