1 // RUN: %clang_cc1 -fsyntax-only -verify %s
5 class B
: private A
{ }; // expected-note {{declared private here}}
8 A
*a
= b
; // expected-error{{cannot cast 'B' to its private base class 'A'}}
16 class B
: A
{ }; // expected-note {{implicitly declared private here}}
19 A
*a
= b
; // expected-error {{cannot cast 'B' to its private base class 'A'}}
27 class B
: public A
{ };
39 class B
: private virtual A
{};
40 class C
: public virtual A
{};
42 class D
: public B
, public C
{};
45 // This takes the D->C->B->A path.
64 class A
{}; // expected-note{{member is declared here}}
66 class B
: private A
{ // expected-note {{declared private here}} expected-note {{constrained by private inheritance here}}
72 A
* a
= c
; // expected-error {{cannot cast 'C' to its private base class 'A'}} \
73 // expected-error {{'A' is a private member of 'T6::A'}}
84 class B
: public A
{};
95 static constexpr bool value
= true;
99 struct trait
: flag
<sizeof(T
)> {}; // expected-note 2{{here}}
101 template <class T
, bool Inferred
= trait
<T
>::value
> // expected-note {{here}}
106 a
<T
> x
; // expected-note {{here}}
112 static_assert(false, ""); // expected-error {{static assertion failed}}
115 // verify "no member named 'value'" bogus diagnostic is not emitted.
116 trait
<b
<Impossible
<0>>>::value
; // expected-note {{here}}