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

Function skipTo

lib/forwardanalyzer.cpp:920–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

918 }
919
920 static Token* skipTo(Token* tok, const Token* dest, const Token* end = nullptr) {
921 if (end && dest->index() > end->index())
922 return nullptr;
923 const int i = dest->index() - tok->index();
924 if (i > 0)
925 return tok->tokAt(dest->index() - tok->index());
926 return nullptr;
927 }
928
929 static Token* getStepTokFromEnd(Token* tok) {
930 if (!Token::simpleMatch(tok, "}"))

Callers 1

updateRangeFunction · 0.85

Calls 1

tokAtMethod · 0.45

Tested by

no test coverage detected