| 2309 | } |
| 2310 | |
| 2311 | static bool isVoidStmt(const Token *tok) |
| 2312 | { |
| 2313 | if (Token::simpleMatch(tok, "( void")) |
| 2314 | return true; |
| 2315 | if (isCPPCast(tok) && tok->astOperand1() && Token::Match(tok->astOperand1()->next(), "< void *| >")) |
| 2316 | return true; |
| 2317 | const Token *tok2 = tok; |
| 2318 | while (tok2->astOperand1()) |
| 2319 | tok2 = tok2->astOperand1(); |
| 2320 | if (Token::simpleMatch(tok2->previous(), ")") && Token::simpleMatch(tok2->linkAt(-1), "( void")) |
| 2321 | return true; |
| 2322 | if (Token::simpleMatch(tok2, "( void")) |
| 2323 | return true; |
| 2324 | return Token::Match(tok2->previous(), "delete|throw|return"); |
| 2325 | } |
| 2326 | |
| 2327 | static bool isConstTop(const Token *tok) |
| 2328 | { |
no test coverage detected