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

Method use

lib/checkunusedvar.cpp:352–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352void Variables::use(nonneg int varid, const Token* tok)
353{
354 VariableUsage *usage = find(varid);
355
356 if (usage) {
357 usage->use();
358 usage->_lastAccess = tok;
359
360 for (auto aliases = usage->_aliases.cbegin(); aliases != usage->_aliases.cend(); ++aliases) {
361 VariableUsage *aliased = find(*aliases);
362
363 if (aliased) {
364 aliased->use();
365 aliased->_lastAccess = tok;
366 }
367 }
368 }
369}
370
371void Variables::modified(nonneg int varid, const Token* tok)
372{

Callers 4

aliasMethod · 0.45
doAssignmentFunction · 0.45
useFunctionArgsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected