summaryrefslogtreecommitdiff
path: root/clang/test/Analysis/dtor-array.cpp
AgeCommit message (Collapse)Author
2022-11-09[analyzer] Fix crash for array-delete of UnknownVal values.Tomasz KamiƄski
We now skip the destruction of array elements for `delete[] p`, if the value of `p` is UnknownVal and does not have corresponding region. This eliminate the crash in `getDynamicElementCount` on that region and matches the behavior for deleting the array of non-constant range. Reviewed By: isuckatcs Differential Revision: https://reviews.llvm.org/D136671
2022-08-25[analyzer] Fix for incorrect handling of 0 length non-POD array constructionisuckatcs
Prior to this patch when the analyzer encountered a non-POD 0 length array, it still invoked the constructor for 1 element, which lead to false positives. This patch makes sure that we no longer construct any elements when we see a 0 length array. Differential Revision: https://reviews.llvm.org/D131501
2022-08-24[analyzer] Process non-POD array element destructorsisuckatcs
The constructors of non-POD array elements are evaluated under certain conditions. This patch makes sure that in such cases we also evaluate the destructors. Differential Revision: https://reviews.llvm.org/D130737