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

Method isModified

lib/checkstl.cpp:2890–2905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2888 }
2889
2890 bool isModified(const Token* tok) const
2891 {
2892 if (tok->variable() && tok->variable()->isConst())
2893 return false;
2894 int n = 1 + (astIsPointer(tok) ? 1 : 0);
2895 for (int i = 0; i < n; i++) {
2896 bool inconclusive = false;
2897 if (isVariableChangedByFunctionCall(tok, i, *settings, &inconclusive))
2898 return true;
2899 if (inconclusive)
2900 return true;
2901 if (isVariableChanged(tok, i, *settings))
2902 return true;
2903 }
2904 return false;
2905 }
2906
2907 template<class Predicate, class F>
2908 void findTokens(Predicate pred, F f) const

Callers 5

afterConditionMethod · 0.45
valueFlowForLoopFunction · 0.45
analyzeRecursiveMethod · 0.45
analyzeRangeMethod · 0.45
traverseMethod · 0.45

Calls 5

astIsPointerFunction · 0.85
isVariableChangedFunction · 0.85
variableMethod · 0.80
isConstMethod · 0.80

Tested by

no test coverage detected