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

Method readAliases

lib/checkunusedvar.cpp:296–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296void Variables::readAliases(nonneg int varid, const Token* tok)
297{
298 const VariableUsage *usage = find(varid);
299
300 if (usage) {
301 for (nonneg int const aliases : usage->_aliases) {
302 VariableUsage *aliased = find(aliases);
303
304 if (aliased) {
305 aliased->_read = true;
306 aliased->_lastAccess = tok;
307 }
308 }
309 }
310}
311
312void Variables::readAll(nonneg int varid, const Token* tok)
313{

Callers 1

doAssignmentFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected