| 2187 | } |
| 2188 | |
| 2189 | void SymbolDatabase::validateVariables() const |
| 2190 | { |
| 2191 | for (auto iter = mVariableList.cbegin(); iter!=mVariableList.cend(); ++iter) { |
| 2192 | const Variable * const var = *iter; |
| 2193 | if (var) { |
| 2194 | if (!var->scope()) { |
| 2195 | const Function* function = getFunctionForArgumentvariable(var); |
| 2196 | if (!var->isArgument() || (!function || function->hasBody())) { // variables which only appear in a function declaration do not have a scope |
| 2197 | throw InternalError(var->nameToken(), "Analysis failed (variable without scope). If the code is valid then please report this failure.", InternalError::INTERNAL); |
| 2198 | } |
| 2199 | } |
| 2200 | } |
| 2201 | } |
| 2202 | } |
| 2203 | |
| 2204 | bool SymbolDatabase::isVariableWithoutSideEffects(const Variable& var, const Type* type) const |
| 2205 | { |
nothing calls this directly
no test coverage detected