Home | History | Annotate | Download | only in Sema
      1 // RUN: %clang -Wmissing-prototypes -fsyntax-only -Xclang -verify %s
      2 
      3 int f();
      4 
      5 int f(int x) { return x; } // expected-warning{{no previous prototype for function 'f'}}
      6 
      7 static int g(int x) { return x; }
      8 
      9 int h(int x) { return x; } // expected-warning{{no previous prototype for function 'h'}}
     10 
     11 static int g2();
     12 
     13 int g2(int x) { return x; }
     14 
     15 void test(void);
     16 
     17 int h3();
     18 int h4(int);
     19 int h4();
     20 
     21 void test(void) {
     22   int h2(int x);
     23   int h3(int x);
     24   int h4();
     25 }
     26 
     27 int h2(int x) { return x; } // expected-warning{{no previous prototype for function 'h2'}}
     28 int h3(int x) { return x; } // expected-warning{{no previous prototype for function 'h3'}}
     29 int h4(int x) { return x; }
     30 
     31 int f2(int);
     32 int f2();
     33 
     34 int f2(int x) { return x; }
     35 
     36 // rdar://6759522
     37 int main(void) { return 0; }
     38