Clang: Send document revision with the completion request

The sent text should always accompanied by the document revision to avoid
useless the reparsing of the translation unit.

Change-Id: I4af50f277f9352f4af0cdda8a32ad76c44c1935f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Marco Bubke
2015-08-26 13:00:05 +02:00
parent dc31e3742a
commit 1a5e7b778d

View File

@@ -677,7 +677,8 @@ void ClangCompletionAssistProcessor::sendFileContent(const QString &projectPartI
ipcCommunicator.registerFilesForCodeCompletion({{m_interface->fileName(),
projectPartId,
Utf8String::fromByteArray(info.unsavedContent),
info.isDocumentModified}});
info.isDocumentModified,
uint(m_interface->textDocument()->revision())}});
}
void ClangCompletionAssistProcessor::sendCompletionRequest(int position,