summaryrefslogtreecommitdiff
path: root/test/Sema/mms-bitfields.c
diff options
context:
space:
mode:
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 0000000000000..d238a7a10d0d2
--- /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];