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

Function validTokenEnd

lib/templatesimplifier.cpp:2706–2719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2704}
2705
2706static bool validTokenEnd(bool bounded, const Token *tok, const Token *backToken, int offset)
2707{
2708 if (!bounded)
2709 return true;
2710
2711 while (tok && offset >= 0) {
2712 if (tok == backToken)
2713 return false;
2714 --offset;
2715 tok = tok->next();
2716 }
2717
2718 return tok && offset < 0;
2719}
2720
2721// TODO: This is not the correct class for simplifyCalculations(), so it
2722// should be moved away.

Callers 1

simplifyCalculationsMethod · 0.85

Calls 1

nextMethod · 0.80

Tested by

no test coverage detected