Home | History | Annotate | Download | only in SemaCXX
      1 // RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin9 -std=c++11 %s
      2 // expected-no-diagnostics
      3 
      4 #pragma ms_struct on
      5 
      6 struct A {
      7   unsigned long a:4;
      8   unsigned char b;
      9   A();
     10 };
     11 
     12 struct B : public A {
     13   unsigned long c:16;
     14 	int d;
     15   B();
     16 };
     17 
     18 static_assert(__builtin_offsetof(B, d) == 12,
     19   "We can't allocate the bitfield into the padding under ms_struct");