]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/SemaCXX/decltype-overloaded-functions.cpp
Vendor import of clang trunk r162107:
[FreeBSD/FreeBSD.git] / test / SemaCXX / decltype-overloaded-functions.cpp
1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
2
3 void f(); // expected-note{{possible target for call}}
4 void f(int); // expected-note{{possible target for call}}
5 decltype(f) a;  // expected-error{{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}} expected-error {{variable has incomplete type 'decltype(f())' (aka 'void')}}
6
7 template<typename T> struct S {
8   decltype(T::f) * f; // expected-error{{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}} expected-error {{call to non-static member function without an object argument}}
9 };
10
11 struct K { 
12   void f();  // expected-note{{possible target for call}}
13   void f(int); // expected-note{{possible target for call}}
14 };
15 S<K> b; // expected-note{{in instantiation of template class 'S<K>' requested here}}