1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 3 int ovl(int); // expected-note 3{{candidate function}} 4 float ovl(float); // expected-note 3{{candidate function}} 5 6 template<typename T> T ovl(T); // expected-note 3{{candidate function}} 7 8 void test(bool b) { 9 (void)((void)0, ovl); // expected-error{{cannot resolve overloaded function 'ovl' from context}} 10 // PR7863 11 (void)(b? ovl : &ovl); // expected-error{{cannot resolve overloaded function 'ovl' from context}} 12 (void)(b? ovl<float> : &ovl); // expected-error{{cannot resolve overloaded function 'ovl' from context}} 13 (void)(b? ovl<float> : ovl<float>); 14 } 15 16 namespace rdar9623945 { 17 void f(...) { 18 } 19 20 class X { 21 public: 22 const char* text(void); 23 void g(void) { 24 f(text()); 25 f(text); // expected-error{{a bound member function may only be called}} 26 f(text()); 27 f(text); // expected-error{{a bound member function may only be called}} 28 } 29 }; 30 } 31