blob: 8c6fb397356295a70c43944cf95d6f0401e6fed6 [file] [log] [blame]
Fariborz Jahanian4657a992009-10-06 23:08:05 +00001// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
2
3struct A {};
4
5struct B {
6 operator A*();
7};
8
9struct C : B {
10
11};
12
13
14void foo(C c, B b, int A::* pmf) {
15 // FIXME. Bug or correct? gcc accepts it. It requires derived-to-base followed by user defined conversion to work.
16 int j = c->*pmf; // expected-error {{left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'struct C'}}
17 int i = b->*pmf;
18}
19