| 336 | } |
| 337 | |
| 338 | static bool isForwardJump(const Token *gotoToken) |
| 339 | { |
| 340 | if (!Token::Match(gotoToken, "goto %name% ;")) |
| 341 | return false; |
| 342 | for (const Token *prev = gotoToken; gotoToken; gotoToken = gotoToken->previous()) { |
| 343 | if (Token::Match(prev, "%name% :") && prev->str() == gotoToken->strAt(1)) |
| 344 | return true; |
| 345 | if (prev->str() == "{" && prev->scope()->type == ScopeType::eFunction) |
| 346 | return false; |
| 347 | } |
| 348 | return false; |
| 349 | } |
| 350 | |
| 351 | static const Token *checkMissingReturnScope(const Token *tok, const Library &library) |
| 352 | { |
no test coverage detected