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

Function isFunctionCall

lib/checkleakautovar.cpp:252–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250 */
251
252static const Token * isFunctionCall(const Token * nameToken)
253{
254 if (!nameToken->isStandardType() && nameToken->isName()) {
255 nameToken = nameToken->next();
256 // check if function is a template
257 if (nameToken && nameToken->link() && nameToken->str() == "<") {
258 // skip template arguments
259 nameToken = nameToken->link()->next();
260 }
261 // check for '('
262 if (nameToken && nameToken->link() && !nameToken->isCast() && nameToken->str() == "(") {
263 // returning opening parenthesis pointer
264 return nameToken;
265 }
266 }
267 return nullptr;
268}
269
270static const Token* getOutparamAllocation(const Token* tok, const Settings& settings)
271{

Callers 2

checkScopeMethod · 0.70

Calls 4

nextMethod · 0.80
isCastMethod · 0.80
isStandardTypeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected