| 366 | } |
| 367 | |
| 368 | static bool isEscapeScope(const Token* tok, const Library& library, bool unknown = false) |
| 369 | { |
| 370 | if (!Token::simpleMatch(tok, "{")) |
| 371 | return false; |
| 372 | // TODO this search for termTok in all subscopes. It should check the end of the scope. |
| 373 | const Token* termTok = Token::findmatch(tok, "return|continue|break|throw|goto", tok->link()); |
| 374 | if (termTok && termTok->scope() == tok->scope()) |
| 375 | return true; |
| 376 | std::string unknownFunction; |
| 377 | if (library.isScopeNoReturn(tok->link(), &unknownFunction)) |
| 378 | return unknownFunction.empty() || unknown; |
| 379 | return false; |
| 380 | } |
| 381 | |
| 382 | void ValueFlow::combineValueProperties(const ValueFlow::Value &value1, const ValueFlow::Value &value2, ValueFlow::Value &result) |
| 383 | { |
no test coverage detected