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

Function valueFlowIsSameContainerType

lib/valueflow.cpp:6553–6562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6551}
6552
6553static bool valueFlowIsSameContainerType(const ValueType& contType, const Token* tok, bool isView, const Settings& settings)
6554{
6555 if (!tok || !tok->valueType())
6556 return true;
6557 if (!tok->valueType()->containerTypeToken)
6558 return !isView;
6559
6560 const ValueType tokType = ValueType::parseDecl(tok->valueType()->containerTypeToken, settings);
6561 return contType.isTypeEqual(&tokType) || tokType.type == ValueType::Type::UNKNOWN_TYPE;
6562}
6563
6564static std::vector<ValueFlow::Value> getInitListSize(const Token* tok,
6565 const ValueType* valueType,

Callers 1

getInitListSizeFunction · 0.85

Calls 1

isTypeEqualMethod · 0.80

Tested by

no test coverage detected