| 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() { |