1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-unused-comparison %s
20 class Derived1
: public Base
{ };
22 class Derived2
: public Base
{ };
24 class X
: public B
, public Derived2
, public Derived1
32 m
.f
<int>(); // expected-error{{no member named 'f' in 'A'}} \
33 // expected-error{{expected '(' for function-style cast}} \
34 // expected-error{{expected expression}}
38 template<typename Derived
> class A
;
39 template<typename Derived
> class B
: A
<Derived
> {
40 typedef A
<Derived
> Base
;
46 namespace AddrOfMember
{
49 template<typename T
> struct S
: T
{
51 P(&T::X
) // expected-error {{cannot cast from type 'int *' to member pointer type 'P'}}
57 S
<A
>().f(); // ok, &T::X is 'int (A::*)', not 'int *', even though T is a base class
60 struct B
: A
{ static int X
; };
62 S
<B
>().f(); // expected-note {{here}}