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

Function setValueKind

lib/infer.cpp:261–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261static void setValueKind(ValueFlow::Value& value, const std::vector<const ValueFlow::Value*>& refs)
262{
263 bool isPossible = false;
264 bool isInconclusive = false;
265 for (const ValueFlow::Value* ref : refs) {
266 if (ref->isPossible())
267 isPossible = true;
268 if (ref->isInconclusive())
269 isInconclusive = true;
270 }
271 if (isInconclusive)
272 value.setInconclusive();
273 else if (isPossible)
274 value.setPossible();
275 else
276 value.setKnown();
277}
278
279static bool inferNotEqual(const std::list<ValueFlow::Value>& values, MathLib::bigint x)
280{

Callers 1

inferFunction · 0.85

Calls 3

isPossibleMethod · 0.80
setInconclusiveMethod · 0.80
isInconclusiveMethod · 0.45

Tested by

no test coverage detected