2010-11-10 05:07:58 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
|
2011-03-17 03:16:25 +08:00
|
|
|
int ovl(int); // expected-note 3{{candidate function}}
|
|
|
|
float ovl(float); // expected-note 3{{candidate function}}
|
2010-11-10 05:07:58 +08:00
|
|
|
|
2011-03-17 03:16:25 +08:00
|
|
|
template<typename T> T ovl(T); // expected-note 3{{candidate function}}
|
2010-11-10 05:07:58 +08:00
|
|
|
|
|
|
|
void test(bool b) {
|
2011-03-17 03:16:25 +08:00
|
|
|
(void)((void)0, ovl); // expected-error{{cannot resolve overloaded function 'ovl' from context}}
|
2010-11-10 05:07:58 +08:00
|
|
|
// PR7863
|
2011-03-17 03:16:25 +08:00
|
|
|
(void)(b? ovl : &ovl); // expected-error{{cannot resolve overloaded function 'ovl' from context}}
|
|
|
|
(void)(b? ovl<float> : &ovl); // expected-error{{cannot resolve overloaded function 'ovl' from context}}
|
2010-11-10 05:07:58 +08:00
|
|
|
(void)(b? ovl<float> : ovl<float>);
|
|
|
|
}
|