try to evaluate the initializer as a constant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108632
91177308-0d34-0410-b5e6-
96231b3b80d8
assert(NextFieldOffsetInBytes <= FieldOffsetInBytes
&& "Field offset mismatch!");
- // Emit the field.
- if (!InitCst)
- return false;
-
unsigned FieldAlignment = getAlignment(InitCst);
// Round up the field offset to the alignment of the field type.
Field->getType(), CGF);
else
EltInit = CGM.EmitNullConstant(Field->getType());
+
+ if (!EltInit)
+ return false;
if (!Field->isBitField()) {
// Handle non-bitfield members.
--- /dev/null
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
+
+int a();
+// CHECK: call i32 @_Z1av()
+struct x {int x, y : 10;} x = {1, a()};