| 3918 | } |
| 3919 | |
| 3920 | const Token *skipUnreachableBranch(const Token *tok) |
| 3921 | { |
| 3922 | if (!Token::simpleMatch(tok, "{")) |
| 3923 | return tok; |
| 3924 | |
| 3925 | if (tok->scope()->type == ScopeType::eIf) { |
| 3926 | return skipUnreachableIfBranch(tok); |
| 3927 | } |
| 3928 | |
| 3929 | if (tok->scope()->type == ScopeType::eElse) { |
| 3930 | return skipUnreachableElseBranch(tok); |
| 3931 | } |
| 3932 | |
| 3933 | return tok; |
| 3934 | } |
no test coverage detected