Cppcheck
|
Store information about variable usage. More...
Public Member Functions | |
VariableUsage (const Variable *var=nullptr, VariableType type=standard, bool read=false, bool write=false, bool modified=false, bool allocateMemory=false) | |
void | use () |
variable is used. More... | |
bool | unused () const |
is variable unused? More... | |
Public Attributes | |
std::set< nonneg int > | _aliases |
std::set< const Scope * > | _assignments |
const Variable * | _var |
const Token * | _lastAccess |
VariableType | mType |
bool | _read |
bool | _write |
bool | _modified |
bool | _allocateMemory |
Store information about variable usage.
Definition at line 107 of file checkunusedvar.cpp.
|
inlineexplicit |
Definition at line 109 of file checkunusedvar.cpp.
|
inline |
is variable unused?
Definition at line 130 of file checkunusedvar.cpp.
Referenced by CheckUnusedVar::checkFunctionVariableUsage().
|
inline |
variable is used.
. set both read+write
Definition at line 124 of file checkunusedvar.cpp.
Referenced by Variables::alias(), and Variables::use().
std::set<nonneg int> Variables::VariableUsage::_aliases |
Definition at line 134 of file checkunusedvar.cpp.
Referenced by Variables::alias(), CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(), Variables::clearAliases(), Variables::eraseAliases(), Variables::modified(), Variables::readAliases(), Variables::use(), and Variables::writeAliases().
bool Variables::VariableUsage::_allocateMemory |
Definition at line 143 of file checkunusedvar.cpp.
Referenced by Variables::allocateMemory(), CheckUnusedVar::checkFunctionVariableUsage(), and CheckUnusedVar::checkFunctionVariableUsage_iterateScopes().
std::set<const Scope*> Variables::VariableUsage::_assignments |
Definition at line 135 of file checkunusedvar.cpp.
Referenced by doAssignment().
const Token* Variables::VariableUsage::_lastAccess |
Definition at line 138 of file checkunusedvar.cpp.
Referenced by Variables::allocateMemory(), CheckUnusedVar::checkFunctionVariableUsage(), Variables::modified(), Variables::read(), Variables::readAliases(), Variables::use(), Variables::write(), and Variables::writeAliases().
bool Variables::VariableUsage::_modified |
Definition at line 142 of file checkunusedvar.cpp.
Referenced by CheckUnusedVar::checkFunctionVariableUsage(), and Variables::modified().
bool Variables::VariableUsage::_read |
Definition at line 140 of file checkunusedvar.cpp.
Referenced by Variables::alias(), CheckUnusedVar::checkFunctionVariableUsage(), Variables::modified(), Variables::read(), Variables::readAliases(), unused(), use(), and Variables::write().
const Variable* Variables::VariableUsage::_var |
Definition at line 137 of file checkunusedvar.cpp.
Referenced by Variables::alias(), CheckUnusedVar::checkFunctionVariableUsage(), Variables::clearAliases(), doAssignment(), Variables::modified(), and Variables::write().
bool Variables::VariableUsage::_write |
Definition at line 141 of file checkunusedvar.cpp.
Referenced by CheckUnusedVar::checkFunctionVariableUsage(), unused(), use(), Variables::write(), and Variables::writeAliases().
VariableType Variables::VariableUsage::mType |
Definition at line 139 of file checkunusedvar.cpp.
Referenced by Variables::alias(), CheckUnusedVar::checkFunctionVariableUsage(), CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(), and doAssignment().