diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2021-11-05 13:47:18 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2021-11-08 09:32:45 +0000 |
commit | 6077bde638c481df9135e045370e571178df15ef (patch) | |
tree | 32104dfca0ddfb9e4606ef056201ce79141826eb /src/libs/3rdparty/cplusplus | |
parent | 9a16eb5fe62780dda7ba10d22f2bfbe6aadd366b (diff) |
CPlusPlus: Allow numeric literals with single quotes
... also in macro expansions.
Amends 8c437362bc. Just like in that patch, we don't prevent trailing
quotes, even though they are not allowed. Unlike in that patch, we don't
check the language version, as it is not set during preprocessor mode
(for whatever reason).
Fixes: QTCREATORBUG-26484
Change-Id: I8737724208802ed9a9005af538cf13fbfd2efd42
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/libs/3rdparty/cplusplus')
-rw-r--r-- | src/libs/3rdparty/cplusplus/Lexer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/3rdparty/cplusplus/Lexer.cpp b/src/libs/3rdparty/cplusplus/Lexer.cpp index 1d814845fe..c0f8731db0 100644 --- a/src/libs/3rdparty/cplusplus/Lexer.cpp +++ b/src/libs/3rdparty/cplusplus/Lexer.cpp @@ -1034,7 +1034,7 @@ void Lexer::scanPreprocessorNumber(Token *tok, bool dotAlreadySkipped) yyinp(); if (_yychar == '+' || _yychar == '-') yyinp(); - } else if (std::isalnum(_yychar) || _yychar == '_' || _yychar == '.') { + } else if (std::isalnum(_yychar) || (_yychar == '\'') || _yychar == '_' || _yychar == '.') { yyinp(); } else { scanOptionalUserDefinedLiteral(tok); |