1 // RUN: %clang_cc1 -fsyntax-only -verify %s
9 void f(int, Float
); // expected-note {{previous declaration is here}}
11 int f(int, Float
); // expected-error {{functions that differ only in their return type cannot be overloaded}}
13 void g(void); // expected-note {{previous declaration is here}}
14 int g(); // expected-error {{functions that differ only in their return type cannot be overloaded}}
20 void f(int); // expected-note {{previous declaration is here}}
23 void f(INT
); // expected-error{{cannot be redeclared}}
25 void g(int); // expected-note {{previous declaration is here}}
26 void g(int, float); // expected-note {{previous declaration is here}}
27 int g(int, Float
); // expected-error {{functions that differ only in their return type cannot be overloaded}}
29 static void g(float); // expected-note {{previous declaration is here}}
30 static void g(int); // expected-error {{static and non-static member functions with the same parameter types cannot be overloaded}}
31 static void g(float); // expected-error {{class member cannot be redeclared}}
33 void h(); // expected-note {{previous declaration is here}}
34 void h() __restrict
; // expected-error {{class member cannot be redeclared}}
37 int main() {} // expected-note {{previous definition is here}}
38 int main(int,char**) {} // expected-error {{conflicting types for 'main'}}