Debian Codegraph @

clang/test/SemaObjC/variable-size-ivar.m

raw
1 // RUN: %clang_cc1 -fsyntax-only %s -verify
2
3 const int ksize = 42;
4 int size = 42;
5
6 @interface X
7 {
8 int arr1[ksize]; // expected-warning{{variable length array folded to constant array}}
9 int arr2[size]; // expected-error{{instance variables must have a constant size}}
10 int arr3[ksize-43]; // expected-error{{array size is negative}}
11 }
12 @end