1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
10 b1(0), // expected-note {{previous initialization is here}}
12 b1(0), // expected-error {{multiple initializations given for non-static member 'b1'}}
13 S(), // expected-note {{previous initialization is here}}
14 S() // expected-error {{multiple initializations given for base 'S'}}
28 A::A() : a(10), b(20) { }
31 template<typename T
> struct A
{};
32 template<typename T
> struct B
: A
<T
> {
34 B() : A
<T
>(), // expected-note {{previous initialization is here}}
35 A
<T
>() { } // expected-error {{multiple initializations given for base 'A<T>'}}
40 template<typename T
> struct A
: T
{
41 A() : T(), // expected-note {{previous initialization is here}}
42 T() { } // expected-error {{multiple initializations given for base 'T'}}
47 template<typename T
> struct A
{
50 A() : t(1), // expected-note {{previous initialization is here}}
51 t(2) { } // expected-error {{multiple initializations given for non-static member 't'}}
71 A(char _
) : a(0), b(0) {}
72 A(short _
) : a(0), c(0) {} // expected-error {{initializing multiple members of union}} expected-note {{previous initialization is here}}
73 A(int _
) : d(0), e(0) {} // expected-error {{initializing multiple members of union}} expected-note {{previous initialization is here}}
74 A(long _
) : a(0), d(0) {} // expected-error {{initializing multiple members of union}} expected-note {{previous initialization is here}}
83 A() : decltype(Base(1))(3) {
85 A(int) : Base(3), // expected-note {{previous initialization is here}}
86 decltype(Base(1))(2), // expected-error {{multiple initializations given for base 'decltype(Base(1))' (aka 'test5::Base')}}
87 decltype(int())() { // expected-error {{constructor initializer 'decltype(int())' (aka 'int') does not name a class}}
89 A(float) : decltype(A())(3) {
94 namespace rdar13185264
{
96 X() : a(), // expected-note{{previous initialization is here}}
97 a() { } // expected-error{{multiple initializations given for non-static member 'a'}}
103 class A
{ public: virtual ~A(); };
105 void Apply(Foo processor
);
106 struct Bar
: public Foo
{};