Lines Matching refs:arr

9   int arr[10];  member
11 constexpr int &get(int n) { return arr[n]; } in get()
12 constexpr const int &get(int n) const { return arr[n]; } in get()
105 uchar arr[4] = { uchar(x >> 24), uchar(x >> 16), uchar(x >> 8), uchar(x) }; in htonl() local
106 …return *reinterpret_cast<int*>(arr); // expected-note {{reinterpret_cast is not allowed in a const… in htonl()
114 uchar arr[4] = { uchar(x >> 24), uchar(x >> 16), uchar(x >> 8), uchar(x) }; in maybe_htonl() local
115 …return *reinterpret_cast<int*>(arr); // expected-note {{reinterpret_cast is not allowed in a const… in maybe_htonl()
192 int arr[1234] = { 1, 2, 3, 4 }; in do_stuff() local
193arr[k1] = 5; // expected-note {{past-the-end}} expected-note {{cannot refer to element 1235}} expe… in do_stuff()
194 return arr[k2]; in do_stuff()
293 int arr[10]; variable
294 static_assert(++ref(&arr[0]) == &arr[1], "");
295 static_assert(++ref(&arr[9]) == &arr[10], "");
296 …static_assert(++ref(&arr[10]) == &arr[11], ""); // expected-error {{constant}} expected-note {{can…
297 static_assert(ref(&arr[0])++ == &arr[0], "");
298 …static_assert(ref(&arr[10])++ == &arr[10], ""); // expected-error {{constant}} expected-note {{can…
299 static_assert(postinc(&arr[0]) == &arr[1], "");
300 static_assert(--ref(&arr[10]) == &arr[9], "");
301 static_assert(--ref(&arr[1]) == &arr[0], "");
302 …static_assert(--ref(&arr[0]) != &arr[0], ""); // expected-error {{constant}} expected-note {{canno…
303 static_assert(ref(&arr[1])-- == &arr[1], "");
304 …static_assert(ref(&arr[0])-- == &arr[0], ""); // expected-error {{constant}} expected-note {{canno…
305 static_assert(postdec(&arr[1]) == &arr[0], "");
380 int arr[123] = {}; in test_ptr() local
381 int *p = arr; in test_ptr()
382 if ((p += 4) != &arr[4]) return false; in test_ptr()
383 if (p != &arr[4]) return false; in test_ptr()
385 if (p != &arr[3]) return false; in test_ptr()
386 if ((p -= -10) != &arr[13]) return false; in test_ptr()
387 if (p != &arr[13]) return false; in test_ptr()
389 if (p != &arr[2]) return false; in test_ptr()
501 int arr[] = { 1, 2, 3, 4, 5 }; in range_for() local
503 for (int x : arr) in range_for()
523 constexpr array() : arr{} {} in array()
525 constexpr array(X ...x) : arr{} { in array()
529 ignore{arr[I] = x ...}; in init()
531 T arr[N]; member
539 constexpr iterator begin() { return iterator(arr); } in begin()
540 constexpr iterator end() { return iterator(arr + N); } in end()
544 array<int, 5> arr { 1, 2, 3, 4, 5 }; in range_for_2() local
546 for (int k : arr) { in range_for_2()
903 constexpr T sum(const T (&arr)[N]) { in sum()
905 for (T i : arr) in sum()