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

Function astCount

lib/astutils.cpp:139–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139nonneg int astCount(const Token* tok, const char* op, int depth)
140{
141 --depth;
142 if (!tok || depth < 0)
143 return 0;
144 if (strcmp(tok->str().c_str(), op) == 0)
145 return astCount(tok->astOperand1(), op, depth) + astCount(tok->astOperand2(), op, depth);
146 return 1;
147}
148
149bool astHasToken(const Token* root, const Token * tok)
150{

Callers 2

executeMultiConditionMethod · 0.85
numberOfArgumentsFunction · 0.85

Calls 3

astOperand1Method · 0.80
astOperand2Method · 0.80
strMethod · 0.45

Tested by

no test coverage detected