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

Method getMovedValue

lib/token.cpp:2615–2624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2613}
2614
2615const ValueFlow::Value* Token::getMovedValue() const
2616{
2617 if (!mImpl->mValues)
2618 return nullptr;
2619 const auto it = std::find_if(mImpl->mValues->begin(), mImpl->mValues->end(), [](const ValueFlow::Value& value) {
2620 return value.isMovedValue() && !value.isImpossible() &&
2621 value.moveKind != ValueFlow::Value::MoveKind::NonMovedVariable;
2622 });
2623 return it == mImpl->mValues->end() ? nullptr : &*it;
2624}
2625
2626const ValueFlow::Value* Token::getContainerSizeValue(const MathLib::bigint val) const
2627{

Callers 1

Calls 3

isImpossibleMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected