1 // RUN: %clang_cc1 -std=c++11 -verify %s
3 struct Public
{} public_
;
4 struct Protected
{} protected_
;
5 struct Private
{} private_
;
13 A(Protected
); // expected-note {{protected here}}
17 A(Private
); // expected-note 4{{private here}}
18 void f(Private
); // expected-note {{private here}}
25 using A::f
; // expected-error {{private member}}
30 B
c(private_
); // expected-error {{private}}
33 B(Public p
, int) : B(p
) {}
34 B(Protected p
, int) : B(p
) {}
35 B(Private p
, int) : B(p
) {} // expected-error {{private}}
40 // There is no access check on the conversion from derived to base here;
41 // protected constructors of A act like protected constructors of B.
42 C(Protected p
) : B(p
) {}
43 C(Private p
) : B(p
) {} // expected-error {{private}}
47 // There is no access check on the conversion from derived to base here.
55 B
b(protected_
); // expected-error {{protected}}
56 B
c(private_
); // expected-error {{private}}
59 namespace ProtectedAccessFromMember
{
63 ES(const ES
&) = delete;
75 b::DES
*b::DES::f() { return new b::DES("foo"); }