xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/member-init-struct.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm-only -verify
2*f4a2713aSLionel Sambuc // expected-no-diagnostics
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc struct A {int a;};
5*f4a2713aSLionel Sambuc struct B {float a;};
6*f4a2713aSLionel Sambuc struct C {
7*f4a2713aSLionel Sambuc   union {
8*f4a2713aSLionel Sambuc     A a;
9*f4a2713aSLionel Sambuc     B b[10];
10*f4a2713aSLionel Sambuc   };
11*f4a2713aSLionel Sambuc   _Complex float c;
12*f4a2713aSLionel Sambuc   int d[10];
13*f4a2713aSLionel Sambuc   void (C::*e)();
CC14*f4a2713aSLionel Sambuc   C() : a(), c(), d(), e() {}
CC15*f4a2713aSLionel Sambuc   C(A x) : a(x) {}
CC16*f4a2713aSLionel Sambuc   C(void (C::*x)(), int y) : b(), c(y), e(x) {}
17*f4a2713aSLionel Sambuc };
18*f4a2713aSLionel Sambuc A x;
19*f4a2713aSLionel Sambuc C a, b(x), c(0, 2);
20