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

Method validateExecutableScopes

lib/symboldatabase.cpp:2153–2169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2151}
2152
2153void 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
2171namespace {
2172 const Function* getFunctionForArgumentvariable(const Variable * const var)

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
strMethod · 0.45
reportErrMethod · 0.45

Tested by

no test coverage detected