ClangCodeModel: Fix erroneous highlighting with clangd

In certain cases, members being initialized were highlighted as output
parameters.

Task-number: QTCREATORBUG-27059
Change-Id: I0de8aee5e4db735251a314b14af04459e6ac772c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2022-02-15 11:05:28 +01:00
parent b1f35bf905
commit a189a74dea
3 changed files with 21 additions and 0 deletions

View File

@@ -1288,6 +1288,10 @@ void ClangdTestHighlighting::test_data()
<< QList<int>{C_LOCAL} << 0;
QTest::newRow("const operator()") << 903 << 5 << 903 << 7
<< QList<int>{C_LOCAL} << 0;
QTest::newRow("member initialization: member (user-defined type)") << 911 << 14 << 911 << 18
<< QList<int>{C_FIELD} << 0;
QTest::newRow("member initialization: member (built-in type)") << 911 << 23 << 911 << 27
<< QList<int>{C_FIELD} << 0;
}
void ClangdTestHighlighting::test()