17ad5d421d9f12bd287aa17fdb00e0f4d5971d76fDouglas Gregor// RUN: %clang_cc1 -fsyntax-only -verify %s 27ad5d421d9f12bd287aa17fdb00e0f4d5971d76fDouglas Gregor 36dbba4fc128e2e2f5b26be996392bd32c0707f13John McCallint ovl(int); // expected-note 3{{possible target for call}} 46dbba4fc128e2e2f5b26be996392bd32c0707f13John McCallfloat ovl(float); // expected-note 3{{possible target for call}} 57ad5d421d9f12bd287aa17fdb00e0f4d5971d76fDouglas Gregor 66dbba4fc128e2e2f5b26be996392bd32c0707f13John McCalltemplate<typename T> T ovl(T); // expected-note 3{{possible target for call}} 77ad5d421d9f12bd287aa17fdb00e0f4d5971d76fDouglas Gregor 87ad5d421d9f12bd287aa17fdb00e0f4d5971d76fDouglas Gregorvoid test(bool b) { 96dbba4fc128e2e2f5b26be996392bd32c0707f13John McCall (void)((void)0, ovl); // expected-error{{reference to overloaded function could not be resolved; did you mean to call it?}} 107ad5d421d9f12bd287aa17fdb00e0f4d5971d76fDouglas Gregor // PR7863 116dbba4fc128e2e2f5b26be996392bd32c0707f13John McCall (void)(b? ovl : &ovl); // expected-error{{reference to overloaded function could not be resolved; did you mean to call it?}} 126dbba4fc128e2e2f5b26be996392bd32c0707f13John McCall (void)(b? ovl<float> : &ovl); // expected-error{{reference to overloaded function could not be resolved; did you mean to call it?}} 137ad5d421d9f12bd287aa17fdb00e0f4d5971d76fDouglas Gregor (void)(b? ovl<float> : ovl<float>); 147ad5d421d9f12bd287aa17fdb00e0f4d5971d76fDouglas Gregor} 158d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor 168d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregornamespace rdar9623945 { 178d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor void f(...) { 188d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor } 198d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor 208d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor class X { 218d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor public: 228d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor const char* text(void); 238d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor void g(void) { 248d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor f(text()); 255acb0c98b363400f6ade0ae7250f0102224e806bJohn McCall f(text); // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}} 268d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor f(text()); 275acb0c98b363400f6ade0ae7250f0102224e806bJohn McCall f(text); // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}} 288d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor } 298d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor }; 308d5e18c69e007f5d0f447b4a716088589a827857Douglas Gregor} 31