Check whether the allocated type is an array type before calling
authorAkira Hatanaka <ahatanaka@apple.com>
Mon, 26 Sep 2022 21:19:53 +0000 (14:19 -0700)
committerAkira Hatanaka <ahatanaka@apple.com>
Mon, 26 Sep 2022 21:21:21 +0000 (14:21 -0700)
commit0ca1051bfc6e9548763f0a52641733393c33a427
tree695df52cc5858f34b97963c7e1356c1a6c1ec778
parent78084d9e77b9a2017e2215491b71b37c2671c292
Check whether the allocated type is an array type before calling
checkArrayElementAlignment in Sema::BuildCXXNew

This commit fixes a bug that was introduced by adaf62ced and reported
here: https://reviews.llvm.org/D133711#3814717
clang/lib/Sema/SemaExprCXX.cpp
clang/test/SemaCXX/array-alignment.cpp