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

Function validTokenStart

lib/templatesimplifier.cpp:2688–2704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2686}
2687
2688static bool validTokenStart(bool bounded, const Token *tok, const Token *frontToken, int offset)
2689{
2690 if (!bounded)
2691 return true;
2692
2693 if (frontToken)
2694 frontToken = frontToken->previous();
2695
2696 while (tok && offset <= 0) {
2697 if (tok == frontToken)
2698 return false;
2699 ++offset;
2700 tok = tok->previous();
2701 }
2702
2703 return tok && offset > 0;
2704}
2705
2706static bool validTokenEnd(bool bounded, const Token *tok, const Token *backToken, int offset)
2707{

Callers 1

simplifyCalculationsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected