Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x |
Anders Carlsson | af017e6 | 2009-06-29 22:58:55 +0000 | [diff] [blame] | 2 | |
Douglas Gregor | db2eae6 | 2011-03-16 19:16:25 +0000 | [diff] [blame] | 3 | void f(); // expected-note{{candidate function}} |
| 4 | void f(int); // expected-note{{candidate function}} |
| 5 | decltype(f) a; // expected-error{{cannot resolve overloaded function 'f' from context}} |
Anders Carlsson | af017e6 | 2009-06-29 22:58:55 +0000 | [diff] [blame] | 6 | |
| 7 | template<typename T> struct S { |
Douglas Gregor | db2eae6 | 2011-03-16 19:16:25 +0000 | [diff] [blame] | 8 | decltype(T::f) * f; // expected-error{{cannot resolve overloaded function 'f' from context}} |
Anders Carlsson | af017e6 | 2009-06-29 22:58:55 +0000 | [diff] [blame] | 9 | }; |
| 10 | |
Douglas Gregor | db2eae6 | 2011-03-16 19:16:25 +0000 | [diff] [blame] | 11 | struct K { |
| 12 | void f(); // expected-note{{candidate function}} |
| 13 | void f(int); // expected-note{{candidate function}} |
| 14 | }; |
John McCall | 7c2342d | 2010-03-10 11:27:22 +0000 | [diff] [blame] | 15 | S<K> b; // expected-note{{in instantiation of template class 'S<K>' requested here}} |