[PATCH] D142550: Fix sizeof of boolean vector
Mariya Podchishchaeva via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 25 09:25:45 PST 2023
Fznamznon added inline comments.
================
Comment at: clang/test/SemaCXX/vector-bool.cpp:97
+ using NineBools = bool __attribute__((ext_vector_type(9)));
+ using ABunchOfBools = bool __attribute__((ext_vector_type(28)));
static_assert(sizeof(FourBools) == 1);
----------------
erichkeane wrote:
> How about 33? Does it grow appropriately with alignment?
Its sizeof evaluates to 8. Looking at the code in ASTContext that seems to be appropriate result since 8 is a next power of 2 after 4.
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