Home | History | Annotate | Download | only in SemaCXX

Lines Matching refs:Arr

536 constexpr int arr[40] = { 1, 2, 3, [8] = 4 }; // expected-warning {{C99 feature}}
543 static_assert(SumNonzero(arr) == 6, "");
544 static_assert(CountZero(arr, arr + 40) == 36, "");
675 struct Arr {
676 char arr[3];
677 constexpr Arr() : arr{'x', 'y', 'z'} {}
679 constexpr int hash(Arr &&a) {
680 return a.arr[0] + a.arr[1] * 0x100 + a.arr[2] * 0x10000;
682 constexpr int k = hash(Arr());
690 int arr[5];
699 static_assert(agg1.arr[-1] == 0, ""); // expected-error {{constant expression}} expected-note {{cannot refer to element -1}}
700 static_assert(agg1.arr[0] == 0, "");
701 static_assert(agg1.arr[4] == 0, "");
702 static_assert(agg1.arr[5] == 0, ""); // expected-error {{constant expression}} expected-note {{read of dereferenced one-past-the-end}}
1448 int arr[k]; // expected-warning {{C99}}
1450 sizeof(arr) // expected-error {{constant expression}}
1601 constexpr int arr[] = { 4, 1, 2, 3, 4 };
1602 static_assert(get(arr, 1) == 1, "");
1603 static_assert(get(arr, 4) == 4, "");
1604 static_assert(get(arr, 0) == 4, ""); // expected-error{{not an integral constant expression}} \
1605 // expected-note{{in call to 'get(arr, 0)'}}
1842 int arr[5][0];
1844 return &arr[3] - &arr[0]; // expected-note {{subtraction of pointers to type 'int [0]' of zero size}}