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

Function isScopeBracket

lib/astutils.cpp:2351–2362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2349}
2350
2351bool isScopeBracket(const Token* tok)
2352{
2353 if (!Token::Match(tok, "{|}"))
2354 return false;
2355 if (!tok->scope())
2356 return false;
2357 if (tok->str() == "{")
2358 return tok->scope()->bodyStart == tok;
2359 if (tok->str() == "}")
2360 return tok->scope()->bodyEnd == tok;
2361 return false;
2362}
2363
2364template<class T, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
2365static T* getTokenArgumentFunctionImpl(T* tok, int& argn)

Callers 1

valueFlowForwardLifetimeFunction · 0.85

Calls 2

scopeMethod · 0.80
strMethod · 0.45

Tested by

no test coverage detected