1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
2 // expected-no-diagnostics
4 // 13.3.3.2 Ranking implicit conversion sequences
5 // conversion of A::* to B::* is better than conversion of A::* to C::*,
10 struct B
: public A
{};
11 struct C
: public B
{};
13 const char * f(int C::*){ return ""; }
14 int f(int B::*) { return 1; }
16 struct D
: public C
{};
18 const char * g(int B::*){ return ""; }
19 int g(int D::*) { return 1; }
25 const char * str
= g(&A::Ai
);
28 // conversion of B::* to C::* is better than conversion of A::* to C::*
29 typedef void (A::*pmfa
)();
30 typedef void (B::*pmfb
)();
31 typedef void (C::*pmfc
)();