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

Function astHasToken

lib/astutils.cpp:149–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149bool astHasToken(const Token* root, const Token * tok)
150{
151 if (!root)
152 return false;
153 while (tok->astParent() && tok != root)
154 tok = tok->astParent();
155 return root == tok;
156}
157
158bool astHasVar(const Token * tok, nonneg int varid)
159{

Callers 2

pruneLifetimesFunction · 0.85

Calls 1

astParentMethod · 0.80

Tested by

no test coverage detected