[PATCH] D142550: Fix sizeof of boolean vector

Mariya Podchishchaeva via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 25 08:09:09 PST 2023


Fznamznon added inline comments.


================
Comment at: clang/test/SemaCXX/vector-bool.cpp:95
+void Sizeof() {
+  using FourBools = bool __attribute__((ext_vector_type(8)));
+  static_assert(sizeof(FourBools) == 1);
----------------
erichkeane wrote:
> tbaeder wrote:
> > Fznamznon wrote:
> > > This is not four bools.
> > Should be 4 instead of 8, shouldn't it?
> Can you add another couple of 'oddball' sizes and make sure they work out right?  I THINK the alignment logic gets it right, but I'd like tests to confirm.
Yes, will fix in a moment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142550



More information about the cfe-commits mailing list