Merge branch 'master' of https://github.com/danmar/cppcheck
This commit is contained in:
commit
ed541ba3b4
@ -396,7 +396,7 @@ static bool iscast(const Token *tok)
|
||||
if (tok2->str() == ")")
|
||||
return tok2->previous()->str() == "*" ||
|
||||
(Token::Match(tok2, ") %any%") &&
|
||||
(!tok2->next()->isOp() && !Token::Match(tok2->next(), "[[]);,?:]")));
|
||||
(!tok2->next()->isOp() && !Token::Match(tok2->next(), "[[]);,?:.]")));
|
||||
if (!Token::Match(tok2, "%var%|*|&|::"))
|
||||
return false;
|
||||
}
|
||||
|
@ -10378,6 +10378,7 @@ private:
|
||||
testAst("x = ((a[i]).f)();", true));
|
||||
ASSERT_EQUALS("abcde.++[.=", testAst("a = b.c[++(d.e)];"));
|
||||
ASSERT_EQUALS("abc(1+=", testAst("a = b(c**)+1;"));
|
||||
ASSERT_EQUALS("abc.=", testAst("a = (b).c;"));
|
||||
|
||||
// casts
|
||||
ASSERT_EQUALS("a1(2(+=",testAst("a=(t)1+(t)2;"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user