AST: fixed ast for 'a(new (X));'
This commit is contained in:
parent
30353d4b61
commit
c537c98751
|
@ -664,7 +664,7 @@ static void compilePrecedence3(Token *&tok, AST_state& state)
|
|||
tok = tok->link()->next();
|
||||
if (Token::Match(tok->link(), ") %type%"))
|
||||
tok = tok->link()->next();
|
||||
else if (Token::Match(tok, "( %type%") && Token::Match(tok->link(), ") [(;]"))
|
||||
else if (Token::Match(tok, "( %type%") && Token::Match(tok->link(), ") [();]"))
|
||||
tok = tok->next();
|
||||
else if (Token::Match(tok, "( &| %var%") && Token::simpleMatch(tok->link(), ") ("))
|
||||
tok = tok->next();
|
||||
|
|
|
@ -8387,6 +8387,7 @@ private:
|
|||
ASSERT_EQUALS("aFoobar(new=", testAst("a = new Foo(bar);"));
|
||||
ASSERT_EQUALS("aFoo(new=", testAst("a = new Foo<bar>();"));
|
||||
ASSERT_EQUALS("X12,3,(new", testAst("new (a,b,c) X(1,2,3);"));
|
||||
ASSERT_EQUALS("aXnew(", testAst("a (new (X));"));
|
||||
ASSERT_EQUALS("adelete", testAst("delete a;"));
|
||||
ASSERT_EQUALS("adelete", testAst("delete (a);"));
|
||||
ASSERT_EQUALS("adelete", testAst("delete[] a;"));
|
||||
|
|
Loading…
Reference in New Issue