Sebastian Redl | c1f8e49 | 2011-03-12 13:44:32 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s |
Sebastian Redl | 0890502 | 2011-02-05 19:23:19 +0000 | [diff] [blame] | 2 | |
| 3 | struct B1 { |
| 4 | B1(int); |
| 5 | B1(int, int); |
| 6 | }; |
| 7 | struct D1 : B1 { |
| 8 | using B1::B1; |
| 9 | }; |
| 10 | D1 d1a(1), d1b(1, 1); |
| 11 | |
| 12 | D1 fd1() { return 1; } |
| 13 | |
| 14 | struct B2 { |
| 15 | explicit B2(int, int = 0, int = 0); |
| 16 | }; |
Sebastian Redl | 22653ba | 2011-08-30 19:58:05 +0000 | [diff] [blame^] | 17 | struct D2 : B2 { // expected-note 2 {{candidate constructor}} |
Sebastian Redl | 0890502 | 2011-02-05 19:23:19 +0000 | [diff] [blame] | 18 | using B2::B2; |
| 19 | }; |
| 20 | D2 d2a(1), d2b(1, 1), d2c(1, 1, 1); |
| 21 | |
| 22 | D2 fd2() { return 1; } // expected-error {{no viable conversion}} |
| 23 | |
| 24 | struct B3 { |
| 25 | B3(void*); // expected-note {{inherited from here}} |
| 26 | }; |
Sebastian Redl | 22653ba | 2011-08-30 19:58:05 +0000 | [diff] [blame^] | 27 | struct D3 : B3 { // expected-note 2 {{candidate constructor}} |
Sebastian Redl | 0890502 | 2011-02-05 19:23:19 +0000 | [diff] [blame] | 28 | using B3::B3; // expected-note {{candidate constructor (inherited)}} |
| 29 | }; |
| 30 | D3 fd3() { return 1; } // expected-error {{no viable conversion}} |