[analyzer] Improve PlacementNewChecker
authorGabor Marton <gabor.marton@ericsson.com>
Thu, 14 May 2020 13:49:07 +0000 (15:49 +0200)
committerGabor Marton <gabor.marton@ericsson.com>
Thu, 14 May 2020 13:50:39 +0000 (15:50 +0200)
commit7c3768495e8c1599dc30986f7bd47d5e91f303f2
tree9e34fe061e5418b5aa0c06e8e67e4efca70da1ae
parent5f3f45dc5338266f4e73bdbea2ce20fdb7142ded
[analyzer] Improve PlacementNewChecker

Summary:
1. Added insufficient storage check for arrays
2. Added align support check

Based on https://reviews.llvm.org/D76229

Reviewers: aaron.ballman, lebedev.ri, NoQ, martong

Reviewed By: martong

Subscribers: xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, ASDenysPetrov, cfe-commits

Tags: #clang

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

Patch by Karasev Nikita!
clang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp
clang/test/Analysis/placement-new.cpp