C++: Improve the description tag.

This commit is contained in:
Mathias Vorreiter Pedersen
2021-04-29 12:10:29 +02:00
parent 9e39b08325
commit e81b40978e

View File

@@ -1,7 +1,7 @@
/**
* @name Detect And Handle Memory Allocation Errors
* @description --::operator new(std::size_t) throws an exception on error, and ::operator new(std::size_t, const std::nothrow_t &) returns zero on error.
* --the programmer can get confused when check the error that occurs when allocating memory incorrectly.
* @description `operator new` throws an exception on allocation failures, while `operator new(std::nothrow)` returns a null pointer.
* Mixing up these two failure conditions can result in unexpected behavior.
* @kind problem
* @id cpp/detect-and-handle-memory-allocation-errors
* @problem.severity warning