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

@@ -328,7 +328,7 @@ void doSemanticHighlighting(
styles.mainStyle = C_PARAMETER;
} else if (token.type == "macro") {
styles.mainStyle = C_MACRO;
} else if (token.type == "type") {
} else if (token.type == "type" || token.type == "concept") {
styles.mainStyle = C_TYPE;
} else if (token.type == "modifier") {
styles.mainStyle = C_KEYWORD;