[PATCH] D142550: Fix sizeof of boolean vector

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 25 08:07:57 PST 2023


erichkeane 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);
----------------
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.


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