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

Function getLoopScope

lib/valueflow.cpp:3375–3383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3373}
3374
3375static const Scope* getLoopScope(const Token* tok)
3376{
3377 if (!tok)
3378 return nullptr;
3379 const Scope* scope = tok->scope();
3380 while (scope && scope->type != ScopeType::eWhile && scope->type != ScopeType::eFor && scope->type != ScopeType::eDo)
3381 scope = scope->nestedIn;
3382 return scope;
3383}
3384
3385//
3386static void valueFlowConditionExpressions(const TokenList& tokenlist,

Callers 2

afterConditionMethod · 0.85

Calls 1

scopeMethod · 0.80

Tested by

no test coverage detected