[PATCH] D123649: Allow flexible array initialization in C++.
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 17 11:36:58 PDT 2022
ahatanak added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4639
+ getDataLayout().getTypeAllocSize(Init->getType()));
+ assert(VarSize == CstSize && "Emitted constant has unexpected size");
+#endif
----------------
This assertion fails when the following code is compiled:
```
typedef unsigned char uint8_t;
typedef uint8_t uint8_a16 __attribute__((aligned(16)));
void foo1() {
static const uint8_a16 array1[] = { 1 };
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123649/new/
https://reviews.llvm.org/D123649
More information about the cfe-commits
mailing list