blob: 1c6e79012ea511215088ebb147bd3fdb7c315afd [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Fariborz Jahanian2be8bf42009-06-29 22:33:26 +00002
3class S {
4public:
5 S ();
6};
7
8struct D : S {
9 D() : b1(0), b2(1), b1(0), S(), S() {} // expected-error {{multiple initializations given for non-static member 'b1'}} \
Mike Stump11289f42009-09-09 15:08:12 +000010 // expected-note {{previous initialization is here}} \
John McCall85f90552010-03-10 11:27:22 +000011 // expected-error {{multiple initializations given for base 'S'}} \
Mike Stump11289f42009-09-09 15:08:12 +000012 // expected-note {{previous initialization is here}}
Fariborz Jahanian2be8bf42009-06-29 22:33:26 +000013
14 int b1;
15 int b2;
16
17};
18
19