summaryrefslogtreecommitdiff
path: root/test/Sema/mms-bitfields.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
commit13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch)
tree2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/Sema/mms-bitfields.c
parent657bc3d9848e3be92029b2416031340988cd0111 (diff)
Notes
Diffstat (limited to 'test/Sema/mms-bitfields.c')
-rw-r--r--test/Sema/mms-bitfields.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Sema/mms-bitfields.c b/test/Sema/mms-bitfields.c
new file mode 100644
index 000000000000..d238a7a10d0d
--- /dev/null
+++ b/test/Sema/mms-bitfields.c
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -mms-bitfields -fsyntax-only -verify -triple x86_64-apple-darwin9 %s
+// expected-no-diagnostics
+
+// The -mms-bitfields commandline parameter should behave the same
+// as the ms_struct attribute.
+struct
+{
+ int a : 1;
+ short b : 1;
+} t;
+
+// MS pads out bitfields between different types.
+static int arr[(sizeof(t) == 8) ? 1 : -1];