[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / nested-base-member-access.cpp
blobf1c7dd9a867e543647982be4e0acacc38ca94d4c
1 // RUN: %clang_cc1 %s -emit-llvm -o %t
3 extern "C" int printf(...);
5 struct M {
6 M(int i){ iM = i; }
7 int iM;
8 void MPR() { printf("iM = %d\n", iM); }
12 struct Q {
13 Q(int i){ iQ = i; }
14 int iQ;
15 void QPR() { printf("iQ = %d\n", iQ); }
18 struct IQ {
19 IQ(int i) { iIQ = i; }
20 void IQPR() { printf("iIQ = %d\n", iIQ); }
21 int iIQ;
24 struct L : IQ {
25 L(int i) : IQ(i+100) { iL = i; }
26 int iL;
29 struct P : Q, L {
30 P(int i) : Q(i+100), L(i+200) { iP = i; }
31 int iP;
32 void PPR() { printf("iP = %d\n", iP); }
36 struct N : M,P {
37 N() : M(100), P(200) {}
38 void PR() {
39 this->MPR(); this->PPR(); this->QPR();
40 IQPR();
41 printf("iM = %d\n", iM);
42 printf("iP = %d\n", iP);
43 printf("iQ = %d\n", iQ);
44 printf("iL = %d\n", iL);
45 printf("iIQ = %d\n", iIQ);
49 int main() {
50 N n1;
51 n1.PR();