ClangCodeModel: Consider concepts in semantic highlighting

We highlight concepts as types for now, as it's a pretty good fit. We can
always introduce a dedicated concept highlighting type later if there is
demand.

Task-number: QTCREATORBUG-28887
Change-Id: I405db5ca4351efd565b968e765fe8bca976a2800
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2023-03-14 09:42:16 +01:00
parent 81bc007ddd
commit 25f1a4804a
4 changed files with 8 additions and 1 deletions

View File

@@ -1280,6 +1280,9 @@ void ClangdTestHighlighting::test_data()
<< QList<int>{C_FIELD} << 0;
QTest::newRow("fake operator method call") << 1050 << 8 << 1050 << 22
<< QList<int>{C_FUNCTION} << 0;
QTest::newRow("concept definition") << 1053 << 30 << 1053 << 42
<< QList<int>{C_TYPE, C_DECLARATION} << 0;
QTest::newRow("concept use") << 1054 << 29 << 1054 << 41 << QList<int>{C_TYPE} << 0;
}
void ClangdTestHighlighting::test()