Home | History | Annotate | Download | only in ADT

Lines Matching full:arrayref

1 //===- llvm/unittest/ADT/ArrayRefTest.cpp - ArrayRef unit tests -----------===//
10 #include "llvm/ADT/ArrayRef.h"
17 // Check that the ArrayRef-of-pointer converting constructor only allows adding
20 std::is_convertible<ArrayRef<int *>, ArrayRef<const int *>>::value,
23 std::is_convertible<ArrayRef<int *>, ArrayRef<volatile int *>>::value,
25 static_assert(!std::is_convertible<ArrayRef<int *>, ArrayRef<float *>>::value,
28 !std::is_convertible<ArrayRef<const int *>, ArrayRef<int *>>::value,
31 !std::is_convertible<ArrayRef<volatile int *>, ArrayRef<int *>>::value,
39 ArrayRef<uint16_t> Array1 = makeArrayRef(Words1, 4);
41 ArrayRef<uint16_t> Array2 = makeArrayRef(Words2, 5);
42 ArrayRef<uint16_t> Array1c = Array1.copy(Alloc);
43 ArrayRef<uint16_t> Array2c = Array2.copy(Alloc);;
52 ArrayRef<int> AR1(TheNumbers);
53 ArrayRef<int> AR2(TheNumbers, AR1.size() - 1);
59 ArrayRef<int> AR1(A1);
70 ArrayRef<int> AR1a = AR1.drop_back();
74 ArrayRef<int> AR1b = AR1a.slice(2, 4);
81 EXPECT_TRUE(ArrayRef<unsigned>() == ArrayRef<unsigned>());
90 ArrayRef<const int *> a((ArrayRef<int *>(A)));
91 a = ArrayRef<int *>(A);
95 static void ArgTest12(ArrayRef<int> A) {
102 ArrayRef<int> A = { 0, 1, 2, 3, 4 };