2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2009-07-09 07:33:52 +08:00
|
|
|
|
2011-02-20 05:32:49 +08:00
|
|
|
template<typename T> T f0(T); // expected-note{{candidate function}}
|
2009-07-09 07:33:52 +08:00
|
|
|
int f0(int); // expected-note{{candidate function}}
|
|
|
|
|
|
|
|
void test_f0() {
|
|
|
|
int (*fp0)(int) = f0;
|
|
|
|
int (*fp1)(int) = &f0;
|
|
|
|
float (*fp2)(float) = &f0;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace N {
|
|
|
|
int f0(int); // expected-note{{candidate function}}
|
|
|
|
}
|
|
|
|
|
|
|
|
void test_f0_2() {
|
|
|
|
using namespace N;
|
2010-11-08 11:40:48 +08:00
|
|
|
int (*fp0)(int) = f0; // expected-error{{address of overloaded function 'f0' is ambiguous}}
|
2009-07-09 07:33:52 +08:00
|
|
|
float (*fp1)(float) = f0;
|
|
|
|
}
|