| 1247 | } |
| 1248 | |
| 1249 | void CheckStlImpl::invalidContainerError(const Token *tok, const ValueFlow::Value *val, ErrorPath errorPath) |
| 1250 | { |
| 1251 | const bool inconclusive = val ? val->isInconclusive() : false; |
| 1252 | if (val) |
| 1253 | errorPath.insert(errorPath.begin(), val->errorPath.cbegin(), val->errorPath.cend()); |
| 1254 | std::string msg = "Using " + lifetimeMessage(tok, val, errorPath); |
| 1255 | errorPath.emplace_back(tok, ""); |
| 1256 | reportError(std::move(errorPath), Severity::error, "invalidContainer", msg + " that may be invalid.", CWE664, inconclusive ? Certainty::inconclusive : Certainty::normal); |
| 1257 | } |
| 1258 | |
| 1259 | void CheckStlImpl::invalidContainerReferenceError(const Token* tok, const Token* contTok, ErrorPath errorPath) |
| 1260 | { |
no test coverage detected