xref: /minix3/external/bsd/llvm/dist/clang/test/Parser/implicit-casts.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
2*f4a2713aSLionel Sambuc _Complex double X;
test1(int c)3*f4a2713aSLionel Sambuc void test1(int c) {
4*f4a2713aSLionel Sambuc   X = 5;
5*f4a2713aSLionel Sambuc }
test2()6*f4a2713aSLionel Sambuc void test2() {
7*f4a2713aSLionel Sambuc   int i;
8*f4a2713aSLionel Sambuc   double d = i;
9*f4a2713aSLionel Sambuc   double _Complex a = 5;
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc   test1(a);
12*f4a2713aSLionel Sambuc   a = 5;
13*f4a2713aSLionel Sambuc   d = i;
14*f4a2713aSLionel Sambuc }
test3()15*f4a2713aSLionel Sambuc int test3() {
16*f4a2713aSLionel Sambuc   int a[2];
17*f4a2713aSLionel Sambuc   a[0] = test3; // expected-warning{{incompatible pointer to integer conversion assigning to 'int' from 'int ()'}}
18*f4a2713aSLionel Sambuc   return 0;
19*f4a2713aSLionel Sambuc }
test4(char c)20*f4a2713aSLionel Sambuc short x; void test4(char c) { x += c; }
test5(char c)21*f4a2713aSLionel Sambuc int y; void test5(char c) { y += c; }
22