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