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

Method hasKnownIntValue

lib/token.cpp:2518–2526  ·  view source on GitHub ↗

if there is a known INT value it will always be the first entry

Source from the content-addressed store, hash-verified

2516
2517// if there is a known INT value it will always be the first entry
2518bool Token::hasKnownIntValue() const
2519{
2520 if (!mImpl->mValues)
2521 return false;
2522 if (mImpl->mValues->empty())
2523 return false;
2524 const ValueFlow::Value& value = mImpl->mValues->front();
2525 return value.isIntValue() && value.isKnown();
2526}
2527
2528bool Token::hasKnownValue() const
2529{

Callers 15

parseFunctionCallMethod · 0.45
checkBufferSizeFunction · 0.45
objectIndexMethod · 0.45
inferConditionFunction · 0.45
checkLongCastMethod · 0.45
checkReallocUsageMethod · 0.45
getEnumTypeFunction · 0.45
parseCompareEachIntFunction · 0.45

Calls 3

frontMethod · 0.80
isKnownMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected