[PATCH] Detect mismatching 'new' and 'delete' uses

Ismail Pazarbasi ismail.pazarbasi at gmail.com
Mon Aug 11 11:15:27 PDT 2014


Updated patch to address following issues:
* Delay checking delete expressions until the end of translation unit
* Collect a list of new-expressions that mismatch with delete-expression
* If at least one new-expression matches with delete-expression, no warning will be emitted
* Do not attempt to recover
* Collect ctor-initializers from //definitions// of constructors
* Added `InitListExprs` support

http://reviews.llvm.org/D4661

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Sema/Sema.h
  lib/Sema/Sema.cpp
  lib/Sema/SemaExprCXX.cpp
  test/Analysis/Malloc+MismatchedDeallocator+NewDelete.cpp
  test/Analysis/MismatchedDeallocator-checker-test.mm
  test/Analysis/MismatchedDeallocator-path-notes.cpp
  test/CodeGenCXX/new.cpp
  test/SemaCXX/delete.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4661.12356.patch
Type: text/x-patch
Size: 27816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140811/afc77804/attachment.bin>


More information about the cfe-commits mailing list