Fariborz Jahanian | ad3607d | 2009-10-09 17:09:58 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s -std=c++0x |
| 2 | |
| 3 | struct A {}; |
| 4 | |
| 5 | struct R { |
| 6 | operator const A*(); |
| 7 | }; |
| 8 | |
| 9 | |
| 10 | struct B : R { |
| 11 | operator A*(); |
| 12 | }; |
| 13 | |
| 14 | struct C : B { |
| 15 | |
| 16 | }; |
| 17 | |
| 18 | |
| 19 | void foo(C c, int A::* pmf) { |
| 20 | // FIXME. Why so many built-in candidates? |
| 21 | int i = c->*pmf; // expected-error {{use of overloaded operator '->*' is ambiguous}} \ |
Fariborz Jahanian | 866b274 | 2009-10-16 23:25:02 +0000 | [diff] [blame] | 22 | // expected-note {{built-in candidate operator->*(struct A const *, int const struct A::*)}} \ |
| 23 | // expected-note {{built-in candidate operator->*(struct A const *, int struct A::*)}} \ |
| 24 | // expected-note {{built-in candidate operator->*(struct A *, int const struct A::*)}} \ |
| 25 | // expected-note {{built-in candidate operator->*(struct A *, int struct A::*)}} |
Fariborz Jahanian | ad3607d | 2009-10-09 17:09:58 +0000 | [diff] [blame] | 26 | } |
| 27 | |