Fixed #8921 (Broken AST - mem = (void*)(new char))
This commit is contained in:
parent
45d874bf75
commit
1e2f1bac1f
|
@ -403,7 +403,7 @@ static bool iscast(const Token *tok)
|
|||
if (Token::Match(tok, "( (| typeof (") && Token::Match(tok->link(), ") %num%"))
|
||||
return true;
|
||||
|
||||
if (Token::Match(tok->link(), ") }|)|]"))
|
||||
if (Token::Match(tok->link(), ") }|)|]|;"))
|
||||
return false;
|
||||
|
||||
if (Token::Match(tok->link(), ") %cop%") && !Token::Match(tok->link(), ") [&*+-~]"))
|
||||
|
|
|
@ -7395,6 +7395,8 @@ private:
|
|||
ASSERT_EQUALS("AB||", testAst("(A)||(B)"));
|
||||
ASSERT_EQUALS("abc[1&=", testAst("a = (b[c]) & 1;"));
|
||||
ASSERT_EQUALS("abc::(=", testAst("a = (b::c)();"));
|
||||
|
||||
ASSERT_EQUALS("pcharnew(=", testAst("p = (void *)(new char);"));
|
||||
}
|
||||
|
||||
void astlambda() {
|
||||
|
|
Loading…
Reference in New Issue