HomePhabricator

[analyzer] Handle destructors for the argument to C++ 'delete'.

Authored by jordan_rose on Sep 25 2013, 9:06 AM.

Description

[analyzer] Handle destructors for the argument to C++ 'delete'.

Now that the CFG includes nodes for the destructors in a delete-expression,
process them in the analyzer using the same common destructor interface
currently used for local, member, and base destructors. Also, check for when
the value is known to be null, in which case no destructor is actually run.

This does not yet handle destructors for deleted /arrays/, which may need
more CFG work. It also causes a slight regression in the location of
double delete warnings; the double delete is detected at the destructor
call, which is implicit, and so is reported on the first access within the
destructor instead of at the 'delete' statement. This will be fixed soon.

Patch by Karthik Bhat!

llvm-svn: 191381

Details

Committed
jordan_roseSep 25 2013, 9:06 AM
Parents
rGcc707bc98941: Produce an error if a -cc1 only option is passed to the driver.
Branches
Unknown
Tags
Unknown