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

Method debugSymbolDatabase

lib/symboldatabase.cpp:2385–2408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2383}
2384
2385void SymbolDatabase::debugSymbolDatabase() const
2386{
2387 if (!mSettings.debugnormal && !mSettings.debugwarnings)
2388 return;
2389 for (const Token* tok = mTokenizer.list.front(); tok != mTokenizer.list.back(); tok = tok->next()) {
2390 if (tok->astParent() && tok->astParent()->getTokenDebug() == tok->getTokenDebug())
2391 continue;
2392 if (tok->getTokenDebug() == TokenDebug::ValueType) {
2393
2394 std::string msg = "Value type is ";
2395 ErrorPath errorPath;
2396 if (tok->valueType()) {
2397 msg += tok->valueType()->str();
2398 errorPath.insert(errorPath.end(), tok->valueType()->debugPath.cbegin(), tok->valueType()->debugPath.cend());
2399
2400 } else {
2401 msg += "missing";
2402 }
2403 errorPath.emplace_back(tok, "");
2404 mErrorLogger.reportErr(
2405 {std::move(errorPath), &mTokenizer.list, Severity::debug, "valueType", msg, CWE{0}, Certainty::normal});
2406 }
2407 }
2408}
2409
2410Variable::Variable(const Token *name_, const std::string &clangType, const Token *typeStart,
2411 const Token *typeEnd, nonneg int index_, AccessControl access_,

Callers

nothing calls this directly

Calls 6

frontMethod · 0.80
nextMethod · 0.80
astParentMethod · 0.80
strMethod · 0.45
endMethod · 0.45
reportErrMethod · 0.45

Tested by

no test coverage detected