| 1687 | } |
| 1688 | |
| 1689 | static const Token* getLifetimeToken(const Token* tok, ErrorPath& errorPath, const Settings& settings, bool* addressOf = nullptr) |
| 1690 | { |
| 1691 | std::vector<ValueFlow::LifetimeToken> lts = ValueFlow::getLifetimeTokens(tok, settings); |
| 1692 | if (lts.size() != 1) |
| 1693 | return nullptr; |
| 1694 | if (lts.front().inconclusive) |
| 1695 | return nullptr; |
| 1696 | if (addressOf) |
| 1697 | *addressOf = lts.front().addressOf; |
| 1698 | errorPath.insert(errorPath.end(), lts.front().errorPath.cbegin(), lts.front().errorPath.cend()); |
| 1699 | return lts.front().token; |
| 1700 | } |
| 1701 | |
| 1702 | const Variable* ValueFlow::getLifetimeVariable(const Token* tok, ErrorPath& errorPath, const Settings& settings, bool* addressOf) |
| 1703 | { |
no test coverage detected