Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
690
static bool isNonZero(const Token* tok)
691
{
692
return tok && (!tok->hasKnownIntValue() || tok->getKnownIntValue() != 0);
693
}
694
695
static const Token* getOtherOperand(const Token* tok)
696
{
Callers
1
valueFlowArrayBool
Function · 0.85
Calls
2
getKnownIntValue
Method · 0.80
hasKnownIntValue
Method · 0.45
Tested by
no test coverage detected