This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
use smart pointers instead of naked pointers and exceptions must not leave the destructor
- From: Edik Bondarenko <bondarenkoedik at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 9 Apr 2013 11:20:41 +0300
- Subject: use smart pointers instead of naked pointers and exceptions must not leave the destructor
Clang does not support c++ syntax (new,delete,shared_ptr) for analyze.
No one c++ checker does not support opportunity to say that 'please
use smart pointer instead of naked pointer'. This is good way to avoid
memory leak and avoid other problems related with naked pointer. It
would be very nice , if gcc could do it.
Very useful to receive an error message when exceptions are leaving
the destructor.
Clang with own analyze tools can not say anything about this error.
It would be very nice if this error is detected by gcc.