| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| int& f(int) const; // expected-note 2 {{candidate function}} |
| float& f(int); // expected-note 2 {{candidate function}} |
| void test_f(int x) const { |
| int& g(int) const; // expected-note 2 {{candidate function}} |
| float& g(int); // expected-note 2 {{candidate function}} |
| static double& g(double); // expected-note 2 {{candidate function}} |
| void test_member_const() const { |
| static void test_member_static() { |
| g(0); // expected-error{{call to 'g' is ambiguous; candidates are:}} |
| void test(X x, const X xc, X* xp, const X* xcp, volatile X xv, volatile X* xvp) { |
| xv.f(0); // expected-error{{no matching member function for call to 'f'; candidates are:}} |
| xvp->f(0); // expected-error{{no matching member function for call to 'f'; candidates are:}} |
| X::g(0); // expected-error{{call to 'g' is ambiguous; candidates are:}} |
| X::h(0); // expected-error{{call to non-static member function without an object argument}} |
| void test_X2(X2 *x2p, const X2 *cx2p) { |
| float &fr = cx2p->member(); |