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