forked from qt-creator/qt-creator
Clang: Reparse only if files are changed
Includes are now watched by a file watcher. Unsaved file changes are watched too. If they are changed the translation units which depend on them are set to a state which require a reparse. Later the diagnostics of this units are collected and send back to creator. Change-Id: I2fb5c7dd6644687f22399edd8d18edd6215c9505 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -222,7 +222,7 @@ TEST_F(ClangIpcServer, GetCodeCompletionForUnsavedFile)
|
||||
|
||||
TEST_F(ClangIpcServer, GetNoCodeCompletionAfterRemovingUnsavedFile)
|
||||
{
|
||||
clangServer.registerTranslationUnitsForCodeCompletion(RegisterTranslationUnitForCodeCompletionMessage({FileContainer(functionTestFilePath, projectPartId)}));
|
||||
clangServer.registerTranslationUnitsForCodeCompletion(RegisterTranslationUnitForCodeCompletionMessage({FileContainer(functionTestFilePath, projectPartId, 74)}));
|
||||
CompleteCodeMessage completeCodeMessage(functionTestFilePath,
|
||||
20,
|
||||
1,
|
||||
@@ -242,7 +242,8 @@ TEST_F(ClangIpcServer, GetNewCodeCompletionAfterUpdatingUnsavedFile)
|
||||
clangServer.registerTranslationUnitsForCodeCompletion(RegisterTranslationUnitForCodeCompletionMessage({FileContainer(functionTestFilePath,
|
||||
projectPartId,
|
||||
unsavedContent(updatedUnsavedTestFilePath),
|
||||
true)}));
|
||||
true,
|
||||
74)}));
|
||||
CompleteCodeMessage completeCodeMessage(functionTestFilePath,
|
||||
20,
|
||||
1,
|
||||
|
||||
Reference in New Issue
Block a user