diff --git a/src/libs/3rdparty/cplusplus/Lexer.cpp b/src/libs/3rdparty/cplusplus/Lexer.cpp index 3b52059a36a1882b6724c27115f7cd9634239443..5179d83b54741751bd4f1e56e61c9a70b44fd76a 100644 --- a/src/libs/3rdparty/cplusplus/Lexer.cpp +++ b/src/libs/3rdparty/cplusplus/Lexer.cpp @@ -579,25 +579,23 @@ void Lexer::scan_helper(Token *tok) } else if (_yychar == '\'') { yyinp(); scanCharLiteral(tok, ch); - } else { - if (_yychar == '8') { - unsigned char la = 0; - if (_currentChar + 1 != _lastChar) - la = *(_currentChar + 1); - if (la == '"') { - yyinp(); - yyinp(); - scanStringLiteral(tok, '8'); - } else if (la == '\'') { - yyinp(); - yyinp(); - scanCharLiteral(tok, '8'); - } else { - scanIdentifier(tok); - } + } else if (ch == 'u' && _yychar == '8') { + unsigned char la = 0; + if (_currentChar + 1 != _lastChar) + la = *(_currentChar + 1); + if (la == '"') { + yyinp(); + yyinp(); + scanStringLiteral(tok, '8'); + } else if (la == '\'') { + yyinp(); + yyinp(); + scanCharLiteral(tok, '8'); } else { scanIdentifier(tok); } + } else { + scanIdentifier(tok); } } else if (std::isalpha(ch) || ch == '_' || ch == '$') { scanIdentifier(tok);