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

Method findChangedVariables

lib/checkstl.cpp:2982–2999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2980
2981 private:
2982 void findChangedVariables()
2983 {
2984 std::set<nonneg int> vars;
2985 for (const Token* tok = bodyTok; precedes(tok, bodyTok->link()); tok = tok->next()) {
2986 if (tok->varId() == 0)
2987 continue;
2988 if (vars.count(tok->varId()) > 0)
2989 continue;
2990 if (isLocalVar(tok->variable())) {
2991 vars.insert(tok->varId());
2992 continue;
2993 }
2994 if (!isModified(tok))
2995 continue;
2996 varsChanged.insert(tok->varId());
2997 vars.insert(tok->varId());
2998 }
2999 }
3000 };
3001} // namespace
3002

Callers

nothing calls this directly

Calls 4

precedesFunction · 0.85
nextMethod · 0.80
variableMethod · 0.80
isModifiedFunction · 0.70

Tested by

no test coverage detected