| 1696 | return unknown(); |
| 1697 | } |
| 1698 | static const ValueFlow::Value* getImpossibleValue(const Token* tok) |
| 1699 | { |
| 1700 | if (!tok) |
| 1701 | return nullptr; |
| 1702 | std::vector<const ValueFlow::Value*> values; |
| 1703 | for (const ValueFlow::Value& v : tok->values()) { |
| 1704 | if (!v.isImpossible()) |
| 1705 | continue; |
| 1706 | if (v.isContainerSizeValue() || v.isIntValue()) { |
| 1707 | values.push_back(std::addressof(v)); |
| 1708 | } |
| 1709 | } |
| 1710 | auto it = |
| 1711 | std::max_element(values.begin(), values.end(), [](const ValueFlow::Value* x, const ValueFlow::Value* y) { |
| 1712 | return x->intvalue < y->intvalue; |
| 1713 | }); |
| 1714 | if (it == values.end()) |
| 1715 | return nullptr; |
| 1716 | return *it; |
| 1717 | } |
| 1718 | |
| 1719 | static bool updateValue(ValueFlow::Value& v, ValueFlow::Value x) |
| 1720 | { |
nothing calls this directly
no test coverage detected