ClangCodeModel: Clear existing libclang diagnostics

... when clangd takes over a document.
This fixes the problem that temporary diagnostics persisted after opening
a session.

Change-Id: Ic781f83747cabb4d15c2c1f8181e36f4343e0394
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-07-08 14:23:32 +02:00
parent fee0a5a74a
commit 1f4826a0c4
4 changed files with 12 additions and 1 deletions

View File

@@ -316,6 +316,7 @@ void ClangModelManagerSupport::updateLanguageClient(ProjectExplorer::Project *pr
if (!project->isKnownFile(entry->fileName()))
continue;
client->openDocument(textDocument);
ClangEditorDocumentProcessor::clearTextMarks(textDocument->filePath());
hasDocuments = true;
}