[PATCH] D133711: [Sema] Reject array element types whose sizes aren't a multiple of their alignments

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 14 13:48:50 PDT 2022


ahatanak updated this revision to Diff 460207.
ahatanak retitled this revision from "[Sema] Reject array element types whose alignments are larger than their sizes" to "[Sema] Reject array element types whose sizes aren't a multiple of their alignments".
ahatanak added a comment.

Check whether the size is a multiple of the alignment.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133711/new/

https://reviews.llvm.org/D133711

Files:
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/SemaExprCXX.cpp
  clang/lib/Sema/SemaType.cpp
  clang/test/CodeGenCXX/ubsan-new-checks.cpp
  clang/test/Layout/ms-aligned-array.c
  clang/test/Layout/ms-x86-misalignedarray.cpp
  clang/test/Sema/align-x86-64.c
  clang/test/Sema/align-x86.c
  clang/test/Sema/attr-aligned.c
  clang/test/SemaCXX/align-x86.cpp
  clang/test/SemaCXX/array-alignment.cpp
  clang/test/SemaCXX/warn-new-overaligned.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133711.460207.patch
Type: text/x-patch
Size: 14271 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220914/7ef51250/attachment-0001.bin>


More information about the cfe-commits mailing list