diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 109fb0a57..cf265e01f 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -453,7 +453,7 @@ static bool iscast(const Token *tok) if (!Token::Match(tok2, "%var%|*|&|::")) return false; - if (tok2->isStandardType()) + if (tok2->isStandardType() && tok2->next()->str() != "(") type = true; } diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 0f3cde7b1..31fb852b5 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -8547,6 +8547,7 @@ private: ASSERT_EQUALS("afoveon_avgimage((foveon_avgimage((+=", testAst("a = foveon_avg(((short(*)[4]) image)) + foveon_avg(((short(*)[4]) image));")); ASSERT_EQUALS("c(40<