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

Function isNegative

lib/checkother.cpp:3439–3442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3437//---------------------------------------------------------------------------
3438
3439static bool isNegative(const Token *tok, const Settings &settings)
3440{
3441 return tok->valueType() && tok->valueType()->sign == ValueType::SIGNED && tok->getValueLE(-1LL, settings);
3442}
3443
3444void CheckOtherImpl::checkNegativeBitwiseShift()
3445{

Callers 7

isOverlappingCondMethod · 0.85
isPositiveMethod · 0.85
absMethod · 0.85
checkMathFunctionsMethod · 0.85
isnegativeMethod · 0.85

Calls 1

getValueLEMethod · 0.80

Tested by 1

isnegativeMethod · 0.68