| 2151 | } |
| 2152 | |
| 2153 | void SymbolDatabase::validateExecutableScopes() const |
| 2154 | { |
| 2155 | const std::size_t functions = functionScopes.size(); |
| 2156 | for (std::size_t i = 0; i < functions; ++i) { |
| 2157 | const Scope* const scope = functionScopes[i]; |
| 2158 | const Function* const function = scope->function; |
| 2159 | if (scope->isExecutable() && !function) { |
| 2160 | const std::list<const Token*> callstack(1, scope->classDef); |
| 2161 | const std::string msg = std::string("Executable scope '") + scope->classDef->str() + "' with unknown function."; |
| 2162 | const ErrorMessage errmsg(callstack, &mTokenizer.list, Severity::debug, |
| 2163 | "symbolDatabaseWarning", |
| 2164 | msg, |
| 2165 | Certainty::normal); |
| 2166 | mErrorLogger.reportErr(errmsg); |
| 2167 | } |
| 2168 | } |
| 2169 | } |
| 2170 | |
| 2171 | namespace { |
| 2172 | const Function* getFunctionForArgumentvariable(const Variable * const var) |