1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fms-extensions -fsyntax-only %s 2>&1 | FileCheck %s 2*0a6a1f1dSLionel Sambuc 3*0a6a1f1dSLionel Sambuc struct __single_inheritance S; 4*0a6a1f1dSLionel Sambuc struct __multiple_inheritance M; 5*0a6a1f1dSLionel Sambuc struct __virtual_inheritance V; 6*0a6a1f1dSLionel Sambuc struct U; 7*0a6a1f1dSLionel Sambuc 8*0a6a1f1dSLionel Sambuc struct SD { char a; int S::*mp; }; 9*0a6a1f1dSLionel Sambuc struct MD { char a; int M::*mp; }; 10*0a6a1f1dSLionel Sambuc struct VD { char a; int V::*mp; }; 11*0a6a1f1dSLionel Sambuc struct UD { char a; int U::*mp; }; 12*0a6a1f1dSLionel Sambuc struct SF { char a; int (S::*mp)(); }; 13*0a6a1f1dSLionel Sambuc struct MF { char a; int (M::*mp)(); }; 14*0a6a1f1dSLionel Sambuc struct VF { char a; int (V::*mp)(); }; 15*0a6a1f1dSLionel Sambuc struct UF { char a; int (U::*mp)(); }; 16*0a6a1f1dSLionel Sambuc 17*0a6a1f1dSLionel Sambuc // CHECK: *** Dumping AST Record Layout 18*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | struct SD 19*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | char a 20*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 4 | int struct S::* mp 21*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | [sizeof=8, align=4 22*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | nvsize=8, nvalign=4] 23*0a6a1f1dSLionel Sambuc 24*0a6a1f1dSLionel Sambuc // CHECK: *** Dumping AST Record Layout 25*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | struct MD 26*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | char a 27*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 4 | int struct M::* mp 28*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | [sizeof=8, align=4 29*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | nvsize=8, nvalign=4] 30*0a6a1f1dSLionel Sambuc 31*0a6a1f1dSLionel Sambuc // CHECK: *** Dumping AST Record Layout 32*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | struct VD 33*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | char a 34*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 8 | int struct V::* mp 35*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | [sizeof=16, align=8 36*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | nvsize=16, nvalign=8] 37*0a6a1f1dSLionel Sambuc 38*0a6a1f1dSLionel Sambuc // CHECK: *** Dumping AST Record Layout 39*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | struct UD 40*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | char a 41*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 8 | int struct U::* mp 42*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | [sizeof=24, align=8 43*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | nvsize=24, nvalign=8] 44*0a6a1f1dSLionel Sambuc 45*0a6a1f1dSLionel Sambuc // CHECK: *** Dumping AST Record Layout 46*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | struct SF 47*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | char a 48*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 4 | int (struct S::*)(void) __attribute__((thiscall)) mp 49*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | [sizeof=8, align=4 50*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | nvsize=8, nvalign=4] 51*0a6a1f1dSLionel Sambuc 52*0a6a1f1dSLionel Sambuc // CHECK: *** Dumping AST Record Layout 53*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | struct MF 54*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | char a 55*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 8 | int (struct M::*)(void) __attribute__((thiscall)) mp 56*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | [sizeof=16, align=8 57*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | nvsize=16, nvalign=8] 58*0a6a1f1dSLionel Sambuc 59*0a6a1f1dSLionel Sambuc // CHECK: *** Dumping AST Record Layout 60*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | struct VF 61*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | char a 62*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 8 | int (struct V::*)(void) __attribute__((thiscall)) mp 63*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | [sizeof=24, align=8 64*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | nvsize=24, nvalign=8] 65*0a6a1f1dSLionel Sambuc 66*0a6a1f1dSLionel Sambuc // CHECK: *** Dumping AST Record Layout 67*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | struct UF 68*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 0 | char a 69*0a6a1f1dSLionel Sambuc // CHECK-NEXT: 8 | int (struct U::*)(void) __attribute__((thiscall)) mp 70*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | [sizeof=24, align=8 71*0a6a1f1dSLionel Sambuc // CHECK-NEXT: | nvsize=24, nvalign=8] 72*0a6a1f1dSLionel Sambuc 73*0a6a1f1dSLionel Sambuc char a[sizeof(SD) + 74*0a6a1f1dSLionel Sambuc sizeof(MD) + 75*0a6a1f1dSLionel Sambuc sizeof(VD) + 76*0a6a1f1dSLionel Sambuc sizeof(UD) + 77*0a6a1f1dSLionel Sambuc sizeof(SF) + 78*0a6a1f1dSLionel Sambuc sizeof(MF) + 79*0a6a1f1dSLionel Sambuc sizeof(VF) + 80*0a6a1f1dSLionel Sambuc sizeof(UF)]; 81