ClangCodeModel: Support new clangd semantic token for labels

See https://reviews.llvm.org/D143260.

Task-number: QTCREATORBUG-27338
Change-Id: I26eb3688f311d93c966901a6639931fec944dd49
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
2023-02-06 15:12:43 +01:00
parent d0bf83f86a
commit 24df1f1183
2 changed files with 5 additions and 0 deletions

View File

@@ -330,6 +330,8 @@ void doSemanticHighlighting(
styles.mainStyle = C_TYPE;
} else if (token.type == "modifier") {
styles.mainStyle = C_KEYWORD;
} else if (token.type == "label") {
styles.mainStyle = C_LABEL;
} else if (token.type == "typeParameter") {
// clangd reports both type and non-type template parameters as type parameters,
// but the latter can be distinguished by the readonly modifier.