forked from qt-creator/qt-creator
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:
@@ -251,6 +251,14 @@ void ClangEditorDocumentProcessor::generateTaskHubIssues()
|
||||
m_diagnosticManager.generateTaskHubIssues();
|
||||
}
|
||||
|
||||
void ClangEditorDocumentProcessor::clearTextMarks(const Utils::FilePath &filePath)
|
||||
{
|
||||
if (ClangEditorDocumentProcessor * const proc = get(filePath.toString())) {
|
||||
proc->m_diagnosticManager.cleanMarks();
|
||||
emit proc->codeWarningsUpdated(proc->revision(), {}, {}, {});
|
||||
}
|
||||
}
|
||||
|
||||
void ClangEditorDocumentProcessor::updateHighlighting(
|
||||
const QVector<ClangBackEnd::TokenInfoContainer> &tokenInfos,
|
||||
const QVector<ClangBackEnd::SourceRangeContainer> &skippedPreprocessorRanges,
|
||||
|
||||
Reference in New Issue
Block a user