Make moc grok binary literals with digit separators
Task-number: QTBUG-75656 Change-Id: I6011ef2fb07497cc2a055d6828a1b6356927c281 Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
c99678fb19
commit
2a1651cc16
|
|
@ -241,7 +241,8 @@ Symbols Preprocessor::tokenize(const QByteArray& input, int lineNum, Preprocesso
|
|||
if (!*data || *data != '.') {
|
||||
token = INTEGER_LITERAL;
|
||||
if (data - lexem == 1 &&
|
||||
(*data == 'x' || *data == 'X')
|
||||
(*data == 'x' || *data == 'X'
|
||||
|| *data == 'b' || *data == 'B')
|
||||
&& *lexem == '0') {
|
||||
++data;
|
||||
while (is_hex_char(*data) || *data == '\'')
|
||||
|
|
|
|||
|
|
@ -524,6 +524,7 @@ private:
|
|||
|
||||
#ifdef Q_MOC_RUN
|
||||
int xx = 11'11; // digit separator must not confuse moc (QTBUG-59351)
|
||||
int xx = 0b11'11; // digit separator in a binary literal must not confuse moc (QTBUG-75656)
|
||||
#endif
|
||||
|
||||
private slots:
|
||||
|
|
|
|||
Loading…
Reference in New Issue