Eek! getDeclAlign sometimes returned alignment in bits.
- Renamed to getDeclAlignInBytes since most other query functions
work in bits.
- Fun to track down as isIntegerConstantExpr was getting it right,
but Evaluate() was getting it wrong. Maybe we should assert they
compute the same thing when they succeed?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64828 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/alignof.c b/test/CodeGen/alignof.c
new file mode 100644
index 0000000..edeb0db
--- /dev/null
+++ b/test/CodeGen/alignof.c
@@ -0,0 +1,12 @@
+// RUN: clang -triple i386-unknown-unknown -O1 -emit-llvm -o %t %s &&
+// RUN: grep 'ret i32 4' %t
+
+enum e0 { E0 };
+struct s0 {
+ enum e0 a:31;
+};
+
+struct s0 t1_tmp;
+int f0() {
+ return __alignof__(t1_tmp);
+}