Fariborz Jahanian | 7881a05 | 2009-06-29 22:33:26 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | |
| 3 | class S { |
| 4 | public: |
| 5 | S (); |
| 6 | }; |
| 7 | |
| 8 | struct D : S { |
| 9 | D() : b1(0), b2(1), b1(0), S(), S() {} // expected-error {{multiple initializations given for non-static member 'b1'}} \ |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 10 | // expected-note {{previous initialization is here}} \ |
| 11 | // expected-error {{multiple initializations given for base 'class S'}} \ |
| 12 | // expected-note {{previous initialization is here}} |
Fariborz Jahanian | 7881a05 | 2009-06-29 22:33:26 +0000 | [diff] [blame] | 13 | |
| 14 | int b1; |
| 15 | int b2; |
| 16 | |
| 17 | }; |
| 18 | |
| 19 | |