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?
llvm-svn: 64828
diff --git a/clang/test/CodeGen/alignof.c b/clang/test/CodeGen/alignof.c
new file mode 100644
index 0000000..edeb0db
--- /dev/null
+++ b/clang/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);
+}