| 940 | } |
| 941 | |
| 942 | const Token *findNextTokenFromBreak(const Token *breakToken) |
| 943 | { |
| 944 | const Scope *scope = breakToken->scope(); |
| 945 | while (scope) { |
| 946 | if (scope->isLoopScope() || scope->type == ScopeType::eSwitch) { |
| 947 | if (scope->type == ScopeType::eDo && Token::simpleMatch(scope->bodyEnd, "} while (")) |
| 948 | return scope->bodyEnd->linkAt(2)->next(); |
| 949 | return scope->bodyEnd; |
| 950 | } |
| 951 | scope = scope->nestedIn; |
| 952 | } |
| 953 | return nullptr; |
| 954 | } |
| 955 | |
| 956 | bool extractForLoopValues(const Token *forToken, |
| 957 | nonneg int &varid, |
no test coverage detected