| 1581 | } |
| 1582 | |
| 1583 | static bool isExpression(const Token* tok) |
| 1584 | { |
| 1585 | if (!tok) |
| 1586 | return false; |
| 1587 | if (Token::simpleMatch(tok, "{") && tok->scope() && tok->scope()->bodyStart != tok && |
| 1588 | (tok->astOperand1() || tok->astOperand2())) |
| 1589 | return true; |
| 1590 | if (!Token::Match(tok, "(|.|[|::|?|:|++|--|%cop%|%assign%")) |
| 1591 | return false; |
| 1592 | if (Token::Match(tok, "*|&|&&")) { |
| 1593 | const Token* vartok = findAstNode(tok, [&](const Token* tok2) { |
| 1594 | const Variable* var = tok2->variable(); |
| 1595 | if (!var) |
| 1596 | return false; |
| 1597 | return var->nameToken() == tok2; |
| 1598 | }); |
| 1599 | if (vartok) |
| 1600 | return false; |
| 1601 | } |
| 1602 | return true; |
| 1603 | } |
| 1604 | |
| 1605 | static std::string getIncompleteNameID(const Token* tok) |
| 1606 | { |
no test coverage detected