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

Method getContainerEmptyValue

lib/programmemory.cpp:137–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135 return false;
136}
137bool ProgramMemory::getContainerEmptyValue(nonneg int exprid, MathLib::bigint& result) const
138{
139 const ValueFlow::Value* value = getValue(exprid, true);
140 if (value && value->isContainerSizeValue()) {
141 if (value->isImpossible() && value->intvalue == 0) {
142 result = false;
143 return true;
144 }
145 if (!value->isImpossible()) {
146 result = (value->intvalue == 0);
147 return true;
148 }
149 }
150 return false;
151}
152
153void ProgramMemory::setContainerSizeValue(const Token* expr, MathLib::bigint value, bool equal)
154{

Callers 1

evaluateFunction · 0.80

Calls 2

getValueFunction · 0.85
isImpossibleMethod · 0.80

Tested by

no test coverage detected