Check improper delete array

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Check improper delete array

Lei Zhang
Hi Clang,

The attached patch adds a Checker to clang, it checks improper uses of delete operator(now using delete instead of delete[] to delete an array). I add poststmt check to VisitCXXNewExpr and prestmt check to VisitCXXDeleteExpr.

I will appreciate it if there are any advice about this patch.

--
Best regards!

Lei Zhang

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

Delete.patch (7K) Download Attachment