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

Function isNestedInSwitch

lib/checkother.cpp:965–977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

963}
964
965static bool isNestedInSwitch(const Scope* scope)
966{
967 while (scope) {
968 if (scope->type == ScopeType::eSwitch)
969 return true;
970 if (scope->type == ScopeType::eUnconditional) {
971 scope = scope->nestedIn;
972 continue;
973 }
974 break;
975 }
976 return false;
977}
978
979static bool isVardeclInSwitch(const Token* tok)
980{

Callers 1

isVardeclInSwitchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected