| 1199 | } |
| 1200 | |
| 1201 | void CheckBufferOverrunImpl::negativeArraySizeError(const Token* tok) |
| 1202 | { |
| 1203 | const std::string arrayName = tok ? tok->expressionString() : std::string(); |
| 1204 | const std::string line1 = arrayName.empty() ? std::string() : ("$symbol:" + arrayName + '\n'); |
| 1205 | reportError(tok, Severity::error, "negativeArraySize", |
| 1206 | line1 + |
| 1207 | "Declaration of array '" + arrayName + "' with negative size is undefined behaviour", CWE758, Certainty::normal); |
| 1208 | } |
| 1209 | |
| 1210 | void CheckBufferOverrunImpl::negativeMemoryAllocationSizeError(const Token* tok, const ValueFlow::Value* value) |
| 1211 | { |
no test coverage detected