[PATCH] D142550: Fix sizeof of boolean vector

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


Fznamznon updated this revision to Diff 492125.
Fznamznon added a comment.

Adjust the test


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142550

Files:
  clang/test/SemaCXX/vector-bool.cpp


Index: clang/test/SemaCXX/vector-bool.cpp
===================================================================
--- clang/test/SemaCXX/vector-bool.cpp
+++ clang/test/SemaCXX/vector-bool.cpp
@@ -92,7 +92,11 @@
 }
 
 void Sizeof() {
-  using FourBools = bool __attribute__((ext_vector_type(8)));
+  using FourBools = bool __attribute__((ext_vector_type(4)));
+  using NineBools = bool __attribute__((ext_vector_type(9)));
+  using ABunchOfBools = bool __attribute__((ext_vector_type(28)));
   static_assert(sizeof(FourBools) == 1);
   static_assert(sizeof(EightBools) == 1);
+  static_assert(sizeof(NineBools) == 2);
+  static_assert(sizeof(ABunchOfBools) == 4);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142550.492125.patch
Type: text/x-patch
Size: 662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230125/d58f5ca4/attachment-0001.bin>


More information about the cfe-commits mailing list