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

Function findAllUsages

lib/valueflow.cpp:5947–5958  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5945}
5946
5947static std::vector<Token*> findAllUsages(const Variable* var,
5948 Token* start,
5949 const Library& library)
5950{
5951 // std::vector<Token*> result;
5952 const Scope* scope = var->scope();
5953 if (!scope)
5954 return {};
5955 return findTokensSkipDeadCode(library, start, scope->bodyEnd, [&](const Token* tok) {
5956 return tok->varId() == var->declarationId();
5957 });
5958}
5959
5960static Token* findStartToken(const Variable* var, Token* start, const Library& library)
5961{

Callers 1

findStartTokenFunction · 0.85

Calls 2

findTokensSkipDeadCodeFunction · 0.85
scopeMethod · 0.80

Tested by

no test coverage detected