21 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3// PR29424typedef void fn(int);5fn f; // expected-note {{previous declaration is here}}6 7int g(int x, int y);8int g(int x, int y = 2);9 10typedef int g_type(int, int);11g_type g;12 13int h(int x) { // expected-note {{previous definition is here}}14 return g(x);15}16 17float f(int) { } // expected-error{{functions that differ only in their return type cannot be overloaded}}18 19int h(int) { } // expected-error{{redefinition of 'h'}}20 21