| 330 | } |
| 331 | |
| 332 | const Token* ValueFlow::parseCompareInt(const Token* tok, |
| 333 | ValueFlow::Value& true_value, |
| 334 | ValueFlow::Value& false_value, |
| 335 | const std::function<std::vector<MathLib::bigint>(const Token*)>& evaluate) |
| 336 | { |
| 337 | const Token* result = nullptr; |
| 338 | parseCompareEachInt( |
| 339 | tok, |
| 340 | [&](const Token* vartok, ValueFlow::Value true_value2, ValueFlow::Value false_value2) { |
| 341 | if (result) |
| 342 | return; |
| 343 | result = vartok; |
| 344 | true_value = std::move(true_value2); |
| 345 | false_value = std::move(false_value2); |
| 346 | }, |
| 347 | [&](const Token* t) -> std::vector<ValueFlow::Value> { |
| 348 | std::vector<ValueFlow::Value> r; |
| 349 | std::vector<MathLib::bigint> v = evaluate(t); |
| 350 | |
| 351 | std::transform(v.cbegin(), v.cend(), std::back_inserter(r), [&](MathLib::bigint i) { |
| 352 | return ValueFlow::Value{i}; |
| 353 | }); |
| 354 | return r; |
| 355 | }); |
| 356 | return result; |
| 357 | } |
| 358 | |
| 359 | const Token *ValueFlow::parseCompareInt(const Token *tok, ValueFlow::Value &true_value, ValueFlow::Value &false_value) |
| 360 | { |
nothing calls this directly
no test coverage detected