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.
Delete.patch (5.2 KB)