Home | History | Annotate | Download | only in PCH
      1 // Test this without pch.
      2 // RUN: %clang_cc1 -include %S/functions.h -fsyntax-only -verify %s
      3 
      4 // Test with pch.
      5 // RUN: %clang_cc1 -emit-pch -o %t %S/functions.h
      6 // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s
      7 // expected-note{{'f1' declared here}}
      8 int f0(int x0, int y0, ...) { return x0 + y0; }
      9 // expected-note{{passing argument to parameter here}}
     10 float *test_f1(int val, double x, double y) {
     11   if (val > 5)
     12     return f1(x, y);
     13   else
     14     return f1(x); // expected-error{{too few arguments to function call}}
     15 }
     16 
     17 void test_g0(int *x, float * y) {
     18   g0(y); // expected-warning{{incompatible pointer types passing 'float *' to parameter of type 'int *'}}
     19   g0(x);
     20 }
     21 
     22 void __attribute__((noreturn)) test_abort(int code) {
     23   do_abort(code);
     24 }
     25 
     26