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

Function gettokenlistfromvalid

lib/library.cpp:178–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178static void gettokenlistfromvalid(const std::string& valid, TokenList& tokenList)
179{
180 const std::string str(valid + ',');
181 tokenList.createTokensFromBuffer(str.data(), str.size()); // TODO: check result?
182 for (Token *tok = tokenList.front(); tok; tok = tok->next()) {
183 if (Token::Match(tok,"- %num%")) {
184 tok->str("-" + tok->strAt(1));
185 tok->deleteNext();
186 }
187 }
188}
189
190Library::Error Library::load(const char exename[], const char path[], bool debug)
191{

Callers 2

isIntArgValidMethod · 0.85
isFloatArgValidMethod · 0.85

Calls 7

frontMethod · 0.80
nextMethod · 0.80
deleteNextMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected