xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/mms-bitfields.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -mms-bitfields -fsyntax-only -verify -triple x86_64-apple-darwin9 %s
2*f4a2713aSLionel Sambuc // expected-no-diagnostics
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc // The -mms-bitfields commandline parameter should behave the same
5*f4a2713aSLionel Sambuc // as the ms_struct attribute.
6*f4a2713aSLionel Sambuc struct
7*f4a2713aSLionel Sambuc {
8*f4a2713aSLionel Sambuc    int a : 1;
9*f4a2713aSLionel Sambuc    short b : 1;
10*f4a2713aSLionel Sambuc } t;
11*f4a2713aSLionel Sambuc 
12*f4a2713aSLionel Sambuc // MS pads out bitfields between different types.
13*f4a2713aSLionel Sambuc static int arr[(sizeof(t) == 8) ? 1 : -1];
14