1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2
3 typedef int Arr[10];
4
5 typedef int trungl_int;
6
f(int a[10],Arr arr)7 void f(int a[10], Arr arr) { // expected-note 4 {{declared here}}
8
9 /* Should warn. */
10 (void)sizeof(a); // \
11 // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'int [10]'}}
12 (void)sizeof((((a)))); // \
13 // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'int [10]'}}
14 (void)sizeof a; // \
15 // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'int [10]'}}
16 (void)sizeof arr; // \
17 // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'Arr' (aka 'int [10]')}}
18
19 /* Shouldn't warn. */
20 int b[10];
21 (void)sizeof b;
22 Arr brr;
23 (void)sizeof brr;
24 (void)sizeof(Arr);
25 (void)sizeof(int);
26 }
27