MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / solveExprValue

Function solveExprValue

lib/vf_analyzers.cpp:1587–1597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1585};
1586
1587static const Token* solveExprValue(const Token* expr, ValueFlow::Value& value)
1588{
1589 return ValueFlow::solveExprValue(
1590 expr,
1591 [](const Token* tok) -> std::vector<MathLib::bigint> {
1592 if (const ValueFlow::Value* v = tok->getKnownValue(ValueFlow::Value::ValueType::INT))
1593 return {v->intvalue};
1594 return {};
1595 },
1596 value);
1597}
1598
1599ValuePtr<Analyzer> makeAnalyzer(const Token* exprTok, ValueFlow::Value value, const Settings& settings)
1600{

Callers 3

solveExprValueMethod · 0.85
makeAnalyzerFunction · 0.85
setValueMethod · 0.85

Calls 1

getKnownValueMethod · 0.80

Tested by

no test coverage detected