HomePhabricator

[analyzer] Suppress temporary destructors for temporary arrays.

Description

[analyzer] Suppress temporary destructors for temporary arrays.

Array destructors, like constructors, need to be called for each element of the
array separately. We do not have any mechanisms to do this in the analyzer,
so for now all we do is evaluate a single constructor or destructor
conservatively and give up. It automatically causes the necessary invalidation
and pointer escape for the whole array, because this is how RegionStore works.

Implement this conservative behavior for temporary destructors. This fixes the
crash on the provided test.

Differential Revision: https://reviews.llvm.org/D43149

Details

Committed
NoQFeb 15 2018, 11:34 AM
Differential Revision
D43149: [analyzer] Fix a crash on destroying a temporary array.
Branches
Unknown
Tags
Unknown