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

Method lastLineTok

externals/simplecpp/simplecpp.cpp:1469–1483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1467}
1468
1469const simplecpp::Token* simplecpp::TokenList::lastLineTok(int maxsize) const
1470{
1471 const Token* prevTok = nullptr;
1472 int count = 0;
1473 for (const Token *tok = cback(); ; tok = tok->previous) {
1474 if (!sameline(tok, cback()))
1475 break;
1476 if (tok->comment)
1477 continue;
1478 if (++count > maxsize)
1479 return nullptr;
1480 prevTok = tok;
1481 }
1482 return prevTok;
1483}
1484
1485const simplecpp::Token* simplecpp::TokenList::isLastLinePreprocessor(int maxsize) const
1486{

Callers

nothing calls this directly

Calls 2

cbackFunction · 0.85
samelineFunction · 0.70

Tested by

no test coverage detected