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

Function arithmeticTypeString

lib/checknullpointer.cpp:518–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516}
517
518static std::string arithmeticTypeString(const Token *tok)
519{
520 if (tok && tok->str()[0] == '-')
521 return "subtraction";
522 if (tok && tok->str()[0] == '+')
523 return "addition";
524 return "arithmetic";
525}
526
527void CheckNullPointerImpl::pointerArithmeticError(const Token* tok, const ValueFlow::Value *value, bool inconclusive)
528{

Callers 2

Calls 1

strMethod · 0.45

Tested by

no test coverage detected