| 5812 | } |
| 5813 | |
| 5814 | static void setFunctionReturnValue(const Function* f, |
| 5815 | Token* tok, |
| 5816 | ValueFlow::Value v, |
| 5817 | const Settings& settings, |
| 5818 | bool known = true) |
| 5819 | { |
| 5820 | if (f->hasVirtualSpecifier()) { |
| 5821 | if (v.isImpossible()) |
| 5822 | return; |
| 5823 | v.setPossible(); |
| 5824 | } else if (!v.isImpossible() && known) { |
| 5825 | v.setKnown(); |
| 5826 | } |
| 5827 | v.errorPath.emplace_back(tok, "Calling function '" + f->name() + "' returns " + v.toString()); |
| 5828 | setTokenValue(tok, std::move(v), settings); |
| 5829 | } |
| 5830 | |
| 5831 | static void valueFlowFunctionReturn(TokenList& tokenlist, ErrorLogger& errorLogger, const Settings& settings) |
| 5832 | { |
no test coverage detected