Cpp: support space ship operator in lexer

Fixes: QTCREATORBUG-27503
Change-Id: Idbff5a9b5b2e6e841e298ca6f706ef3c6aa1622b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2022-10-20 13:43:10 +02:00
parent c780151aec
commit 4e8b7eee9d
11 changed files with 93 additions and 49 deletions

View File

@@ -442,6 +442,7 @@ void tst_SimpleLexer::ppOpOrPunc()
const QByteArray source = QTest::currentDataTag();
LanguageFeatures languageFeatures;
languageFeatures.cxxEnabled = true;
languageFeatures.cxx20Enabled = true;
run(source, toTokens({unsigned(expectedTokenKind)}), false, CompareKind, true, languageFeatures);
}
@@ -492,6 +493,7 @@ void tst_SimpleLexer::ppOpOrPunc_data()
QTest::newRow("==") << T_EQUAL_EQUAL;
QTest::newRow("!=") << T_EXCLAIM_EQUAL;
QTest::newRow("<=") << T_LESS_EQUAL;
QTest::newRow("<=>") << T_LESS_EQUAL_GREATER;
QTest::newRow(">=") << T_GREATER_EQUAL;
QTest::newRow("&&") << T_AMPER_AMPER;
QTest::newRow("||") << T_PIPE_PIPE;