[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / PCH / functions.c
blobfa2ba8d29c038e77be0ee6718e4e8a0ef1567c09
1 // Test this without pch.
2 // RUN: %clang_cc1 -include %S/functions.h -fsyntax-only -verify %s
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
8 int f0(int x0, int y0, ...) { return x0 + y0; }
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 // expected-note@functions.h:7{{'f1' declared here}}
18 void test_g0(int *x, float * y) {
19 g0(y); // expected-warning{{incompatible pointer types passing 'float *' to parameter of type 'int *'}}
20 // expected-note@functions.h:9{{passing argument to parameter here}}
21 g0(x);
24 void __attribute__((noreturn)) test_abort(int code) {
25 do_abort(code);