forked from qt-creator/qt-creator
ClangCodeModel: Fix mis-highlighting of lambda calls
Calls to lambdas without arguments that are declared as const variables were erroneously displayed as output arguments. Change-Id: Ibd914431a34157606694f85d8e00c0dd1db1a618 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:
@@ -1285,6 +1285,14 @@ void ClangdTestHighlighting::test_data()
|
||||
<< QList<int>{C_LOCAL} << 0;
|
||||
QTest::newRow("const member as function argument") << 868 << 32 << 868 << 43
|
||||
<< QList<int>{C_FIELD} << 0;
|
||||
QTest::newRow("lambda call without arguments (const var)") << 887 << 5 << 887 << 12
|
||||
<< QList<int>{C_LOCAL} << 0;
|
||||
QTest::newRow("lambda call without arguments (non-const var)") << 889 << 5 << 889 << 12
|
||||
<< QList<int>{C_LOCAL} << 0;
|
||||
QTest::newRow("non-const operator()") << 898 << 5 << 898 << 7
|
||||
<< QList<int>{C_LOCAL} << 0;
|
||||
QTest::newRow("const operator()") << 903 << 5 << 903 << 7
|
||||
<< QList<int>{C_LOCAL} << 0;
|
||||
}
|
||||
|
||||
void ClangdTestHighlighting::test()
|
||||
|
||||
Reference in New Issue
Block a user