blob: f4aacd64ddbceefb720547883659580a194201cf [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x
Anders Carlssonaf017e62009-06-29 22:58:55 +00002
Douglas Gregordb2eae62011-03-16 19:16:25 +00003void f(); // expected-note{{candidate function}}
4void f(int); // expected-note{{candidate function}}
5decltype(f) a; // expected-error{{cannot resolve overloaded function 'f' from context}}
Anders Carlssonaf017e62009-06-29 22:58:55 +00006
7template<typename T> struct S {
Douglas Gregordb2eae62011-03-16 19:16:25 +00008 decltype(T::f) * f; // expected-error{{cannot resolve overloaded function 'f' from context}}
Anders Carlssonaf017e62009-06-29 22:58:55 +00009};
10
Douglas Gregordb2eae62011-03-16 19:16:25 +000011struct K {
12 void f(); // expected-note{{candidate function}}
13 void f(int); // expected-note{{candidate function}}
14};
John McCall7c2342d2010-03-10 11:27:22 +000015S<K> b; // expected-note{{in instantiation of template class 'S<K>' requested here}}