Merge remote-tracking branch 'origin/10.0'

Change-Id: Ie591b7130b33a042509e56701384f8ff4d9cb7f8
This commit is contained in:
Eike Ziller
2023-03-16 11:57:01 +01:00
42 changed files with 41567 additions and 40656 deletions

View File

@@ -326,7 +326,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;

View File

@@ -1300,6 +1300,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()

View File

@@ -1049,3 +1049,6 @@ void useStrangeStruct(StructWithMisleadingMemberNames *s) {
s->operatormember = 5;
s->operatorMethod();
}
template<typename T> concept NoConstraint = true;
static void constrainedFunc(NoConstraint auto t) {}

View File

@@ -1,4 +1,5 @@
TEMPLATE = app
CONFIG -= qt
CONFIG += c++2a
SOURCES = highlighting.cpp
QMAKE_CXXFLAGS += -broken