Douglas Gregor | 00aeb52 | 2009-07-08 23:33:52 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | |
| 3 | template<typename T> T f0(T); |
| 4 | int f0(int); // expected-note{{candidate function}} |
| 5 | |
| 6 | void test_f0() { |
| 7 | int (*fp0)(int) = f0; |
| 8 | int (*fp1)(int) = &f0; |
| 9 | float (*fp2)(float) = &f0; |
| 10 | } |
| 11 | |
| 12 | namespace N { |
| 13 | int f0(int); // expected-note{{candidate function}} |
| 14 | } |
| 15 | |
| 16 | int f0(int); |
| 17 | |
| 18 | void test_f0_2() { |
| 19 | using namespace N; |
| 20 | int (*fp0)(int) = f0; // expected-error{{ambiguous}} \ |
| 21 | // expected-error{{initializing}} |
| 22 | float (*fp1)(float) = f0; |
| 23 | } |