forked from qt-creator/qt-creator
ClangCodeModel: Do not traverse the AST in the semantic highlighter
... with clangd >= 17. We do not need to look at AST nodes anymore; everything comes from the server. Change-Id: I46eb91f26515e31b752020edbc32f1b23c1d79c7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1468,7 +1468,10 @@ void ClangdClient::Private::handleSemanticTokens(TextDocument *doc,
|
||||
data.highlighter->setHighlightingRunner(runner);
|
||||
data.highlighter->run();
|
||||
};
|
||||
getAndHandleAst(doc, astHandler, AstCallbackMode::SyncIfPossible);
|
||||
if (q->versionNumber().majorVersion() >= 17)
|
||||
astHandler({}, {});
|
||||
else
|
||||
getAndHandleAst(doc, astHandler, AstCallbackMode::SyncIfPossible);
|
||||
}
|
||||
|
||||
std::optional<QList<CodeAction> > ClangdDiagnostic::codeActions() const
|
||||
|
||||
Reference in New Issue
Block a user