2011-10-14 06:29:44 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
|
2009-10-10 01:09:58 +08:00
|
|
|
|
|
|
|
struct A {};
|
|
|
|
|
|
|
|
struct R {
|
|
|
|
operator const A*();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct B : R {
|
|
|
|
operator A*();
|
|
|
|
};
|
|
|
|
|
|
|
|
struct C : B {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
void foo(C c, int A::* pmf) {
|
|
|
|
// FIXME. Why so many built-in candidates?
|
|
|
|
int i = c->*pmf; // expected-error {{use of overloaded operator '->*' is ambiguous}} \
|
2010-09-05 08:17:29 +08:00
|
|
|
// expected-note {{built-in candidate operator->*(const struct A *, const int struct A::*)}} \
|
|
|
|
// expected-note {{built-in candidate operator->*(const struct A *, int struct A::*)}} \
|
2010-09-05 08:04:01 +08:00
|
|
|
// expected-note {{built-in candidate operator->*(struct A *, const int struct A::*)}} \
|
2009-10-17 07:25:02 +08:00
|
|
|
// expected-note {{built-in candidate operator->*(struct A *, int struct A::*)}}
|
2009-10-10 01:09:58 +08:00
|
|
|
}
|
|
|
|
|