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

Method VariableUsage

lib/checkunusedvar.cpp:106–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 class VariableUsage {
105 public:
106 explicit VariableUsage(const Variable *var = nullptr,
107 VariableType type = standard,
108 bool read = false,
109 bool write = false,
110 bool modified = false,
111 bool allocateMemory = false) :
112 _var(var),
113 _lastAccess(var ? var->nameToken() : nullptr),
114 mType(type),
115 _read(read),
116 _write(write),
117 _modified(modified),
118 _allocateMemory(allocateMemory) {}
119
120 /** variable is used.. set both read+write */
121 void use() {

Callers

nothing calls this directly

Calls 1

nameTokenMethod · 0.45

Tested by

no test coverage detected