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