AST: Handle L'x'
This commit is contained in:
parent
47b98470eb
commit
6869d0de30
|
@ -413,6 +413,8 @@ static void compileTerm(Token *& tok, std::stack<Token*> &op)
|
|||
{
|
||||
if (!tok)
|
||||
return;
|
||||
if (Token::Match(tok, "L %str%|%char%"))
|
||||
tok = tok->next();
|
||||
if (tok->isLiteral()) {
|
||||
op.push(tok);
|
||||
tok = tok->next();
|
||||
|
|
|
@ -9991,6 +9991,9 @@ private:
|
|||
testAst("char a[1]=\"\";"); // don't crash
|
||||
testAst("int f(char argv[]);"); // don't crash
|
||||
testAst("--"); // don't crash
|
||||
|
||||
ASSERT_EQUALS("'X''a'>", testAst("('X' > 'a')"));
|
||||
ASSERT_EQUALS("'X''a'>", testAst("(L'X' > L'a')"));
|
||||
}
|
||||
|
||||
void astpar() const { // parentheses
|
||||
|
|
Loading…
Reference in New Issue