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

Function isNonZero

lib/valueflow.cpp:690–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688}
689
690static bool isNonZero(const Token* tok)
691{
692 return tok && (!tok->hasKnownIntValue() || tok->getKnownIntValue() != 0);
693}
694
695static const Token* getOtherOperand(const Token* tok)
696{

Callers 1

valueFlowArrayBoolFunction · 0.85

Calls 2

getKnownIntValueMethod · 0.80
hasKnownIntValueMethod · 0.45

Tested by

no test coverage detected