ClangCodeModel: Fix more false output arguments with clangd

For some reason, we never checked the actual matching AST node for
const-ness.

Change-Id: Icb58ba169d82e1ec02c9ff8d17f0170f0a78f99d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2022-02-22 15:27:47 +01:00
parent 7b82b55b73
commit cf90264971
3 changed files with 15 additions and 0 deletions

View File

@@ -2675,6 +2675,8 @@ static void semanticHighlighter(QFutureInterface<HighlightingResult> &future,
|| path.rbegin()->kind() == "CXXConstruct")) {
return false;
}
if (path.rbegin()->hasConstType())
return false;
for (auto it = path.rbegin() + 1; it != path.rend(); ++it) {
if (it->kind() == "Call" || it->kind() == "CXXConstruct"
|| it->kind() == "MemberInitializer") {