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

Method findToken

test/testsymboldatabase.cpp:81–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 static const Token* findToken(Tokenizer& tokenizer, const std::string& expr, unsigned int exprline)
82 {
83 for (const Token* tok = tokenizer.tokens(); tok; tok = tok->next()) {
84 if (Token::simpleMatch(tok, expr.c_str(), expr.size()) && tok->linenr() == exprline) {
85 return tok;
86 }
87 }
88 return nullptr;
89 }
90
91 static std::string asExprIdString(const Token* tok)
92 {

Callers

nothing calls this directly

Calls 3

nextMethod · 0.80
simpleMatchFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected