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

Function getIteratorValues

lib/valueflow.cpp:6403–6412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6401}
6402
6403static std::list<ValueFlow::Value> getIteratorValues(std::list<ValueFlow::Value> values,
6404 const ValueFlow::Value::ValueKind* kind = nullptr)
6405{
6406 values.remove_if([&](const ValueFlow::Value& v) {
6407 if (kind && v.valueKind != *kind)
6408 return true;
6409 return !v.isIteratorValue();
6410 });
6411 return values;
6412}
6413
6414struct IteratorConditionHandler : SimpleConditionHandler {
6415 std::vector<Condition> parse(const Token* tok, const Settings& /*settings*/) const override {

Callers 2

parseMethod · 0.85
valueFlowIteratorInferFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected