1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
5 int &a
; // expected-note 2{{here}}
12 S() {} // expected-error {{constructor for 'S' must explicitly initialize the reference member 'a'}}
13 S(int) : a(n
) {} // ok
14 S(char) : b(n
) {} // expected-error {{constructor for 'S' must explicitly initialize the reference member 'a'}}
15 S(double) : a(n
), b(n
) {} // ok
19 int a
= 0; // expected-note {{previous initialization}}
20 char b
= 'x'; // expected-error {{initializing multiple members of union}}
25 U(double) : a(1), // expected-note{{previous initialization is here}}
26 b('y') {} // expected-error{{initializing multiple members of union}}
29 // PR10954: variant members do not acquire an implicit initializer.
30 namespace VariantMembers
{
31 struct NoDefaultCtor
{
40 V(int n
, bool) : ndc(n
) {}
49 K(int n
, bool) : ndc(n
) {}