| 5500 | } |
| 5501 | |
| 5502 | static void valueFlowInjectParameter(const TokenList& tokenlist, |
| 5503 | ErrorLogger& errorLogger, |
| 5504 | const Settings& settings, |
| 5505 | const Scope* functionScope, |
| 5506 | const std::unordered_map<const Variable*, std::list<ValueFlow::Value>>& vars) |
| 5507 | { |
| 5508 | const bool r = productParams(settings, vars, [&](const std::unordered_map<const Variable*, ValueFlow::Value>& arg) { |
| 5509 | auto a = makeMultiValueFlowAnalyzer(arg, settings); |
| 5510 | valueFlowGenericForward(const_cast<Token*>(functionScope->bodyStart), |
| 5511 | functionScope->bodyEnd, |
| 5512 | a, |
| 5513 | tokenlist, |
| 5514 | errorLogger, |
| 5515 | settings); |
| 5516 | }); |
| 5517 | if (!r) { |
| 5518 | std::string fname = "<unknown>"; |
| 5519 | if (const Function* f = functionScope->function) |
| 5520 | fname = f->name(); |
| 5521 | if (settings.debugwarnings) |
| 5522 | bailout(tokenlist, errorLogger, functionScope->bodyStart, "Too many argument passed to " + fname); |
| 5523 | } |
| 5524 | } |
| 5525 | |
| 5526 | static void valueFlowInjectParameter(const TokenList& tokenlist, |
| 5527 | ErrorLogger& errorLogger, |
no test coverage detected