ClangCodeModel: Fix mis-detection of class members as operators

The name check was not tight enough.

Change-Id: I5d813a29525bd5b5c23ce04f0bd9e5982a36536e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2022-04-20 17:27:51 +02:00
parent 2529b62315
commit cf96a91b69
3 changed files with 28 additions and 3 deletions

View File

@@ -1329,6 +1329,14 @@ void ClangdTestHighlighting::test_data()
<< QList<int>{C_FIELD} << 0;
QTest::newRow("pass inherited member by value") << 1038 << 21 << 1038 << 26
<< QList<int>{C_FIELD} << 0;
QTest::newRow("fake operator member declaration") << 1045 << 9 << 1045 << 23
<< QList<int>{C_FIELD, C_DECLARATION} << 0;
QTest::newRow("fake operator method declaration") << 1046 << 10 << 1046 << 24
<< QList<int>{C_FUNCTION, C_DECLARATION} << 0;
QTest::newRow("fake operator member access") << 1049 << 8 << 1049 << 22
<< QList<int>{C_FIELD} << 0;
QTest::newRow("fake operator method call") << 1050 << 8 << 1050 << 22
<< QList<int>{C_FUNCTION} << 0;
}
void ClangdTestHighlighting::test()