| 460 | } |
| 461 | |
| 462 | static bool isDeadScope(const Token * tok, const Scope * scope) |
| 463 | { |
| 464 | if (!tok) |
| 465 | return false; |
| 466 | if (!scope) |
| 467 | return false; |
| 468 | const Variable * var = tok->variable(); |
| 469 | if (var && (!var->isLocal() || var->isStatic() || var->isExtern())) |
| 470 | return false; |
| 471 | if (tok->scope() && tok->scope()->bodyEnd != scope->bodyEnd && precedes(tok->scope()->bodyEnd, scope->bodyEnd)) |
| 472 | return true; |
| 473 | return false; |
| 474 | } |
| 475 | |
| 476 | static int getPointerDepth(const Token *tok) |
| 477 | { |
no test coverage detected