| 6596 | } |
| 6597 | |
| 6598 | static std::vector<ValueFlow::Value> getContainerSizeFromConstructor(const Token* tok, |
| 6599 | const ValueType* valueType, |
| 6600 | const Settings& settings, |
| 6601 | bool known = true) |
| 6602 | { |
| 6603 | std::vector<const Token*> args = getArguments(tok); |
| 6604 | if (args.empty()) |
| 6605 | return {makeContainerSizeValue(MathLib::bigint{0}, known)}; |
| 6606 | // Init list in constructor |
| 6607 | if (args.size() == 1 && Token::simpleMatch(args[0], "{")) |
| 6608 | return getInitListSize(args[0], valueType, settings, known); |
| 6609 | return getContainerSizeFromConstructorArgs(args, valueType->container, known); |
| 6610 | } |
| 6611 | |
| 6612 | static void valueFlowContainerSetTokValue(const TokenList& tokenlist, ErrorLogger& errorLogger, const Settings& settings, const Token* tok, Token* initList) |
| 6613 | { |
no test coverage detected