| /llvm-project/libc/test/src/stdlib/ |
| H A D | qsort_test.cpp | |
| H A D | qsort_r_test.cpp | 29 int array[25] = {10, 23, 33, 35, 55, 70, 71, 100, 110, in TEST() local 32 constexpr size_t ARRAY_SIZE = sizeof(array) / sizeof(int); in TEST() 36 LIBC_NAMESPACE::qsort_r(array, ARRAY_SIZE, sizeof(int), int_compare_count, in TEST() 39 ASSERT_LE(array[0], 10); in TEST() 40 ASSERT_LE(array[1], 23); in TEST() 41 ASSERT_LE(array[2], 33); in TEST() 42 ASSERT_LE(array[3], 35); in TEST() 43 ASSERT_LE(array[4], 55); in TEST() 44 ASSERT_LE(array[5], 70); in TEST() 45 ASSERT_LE(array[ in TEST() 71 int array[25] = {25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, TEST() local 125 PriorityVal array[5] = { TEST() local [all...] |
| /llvm-project/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ |
| H A D | stable_partition.pass.cpp | 43 P array[] = in test() local 56 const unsigned size = sizeof(array)/sizeof(array[0]); in test() 57 Iter r = std::stable_partition(Iter(array), Iter(array+size), odd_first()); in test() 58 assert(base(r) == array + 4); in test() 59 assert(array[0] == P(1, 1)); in test() 60 assert(array[1] == P(1, 2)); in test() 61 assert(array[2] == P(3, 1)); in test() 62 assert(array[ in test() 72 P array[] = test() local 112 P array[] = test() local 141 P array[] = test() local 170 P array[] = test() local 199 P array[] = test() local 228 P array[] = test() local 257 P array[] = test() local 320 std::unique_ptr<int> array[size]; test1() local [all...] |
| /llvm-project/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/ |
| H A D | midpoint.pointer.pass.cpp | 31 constexpr T array[1000] = {}; in constexpr_test() local 32 ASSERT_SAME_TYPE(decltype(std::midpoint(array, array)), const T*); in constexpr_test() 33 ASSERT_NOEXCEPT( std::midpoint(array, array)); in constexpr_test() 35 static_assert(std::midpoint(array, array) == array, ""); in constexpr_test() 36 static_assert(std::midpoint(array, array + 1000) == array + 500, ""); in constexpr_test() 38 static_assert(std::midpoint(array, array + 9) == array + 4, ""); in constexpr_test() 39 static_assert(std::midpoint(array, array + 10) == array + 5, ""); in constexpr_test() 40 static_assert(std::midpoint(array, array + 11) == array + 5, ""); in constexpr_test() 41 static_assert(std::midpoint(array + 9, array) == array + 5, ""); in constexpr_test() 42 static_assert(std::midpoint(array + 10, array) == array + 5, ""); in constexpr_test() [all …]
|
| /llvm-project/clang/test/AST/ |
| H A D | ast-print-openacc-compute-construct.cpp | 6 float array[5]; in foo() local 18 #pragma acc kernels if(i == array[1]) in foo() 27 #pragma acc parallel num_gangs(i, (int)array[2]) in foo() 37 #pragma acc parallel vector_length((int)array[1]) in foo() 41 #pragma acc parallel private(i, array[1], array, array[1:2]) in foo() 45 #pragma acc parallel firstprivate(i, array[1], array, array[1:2]) in foo() 49 #pragma acc parallel no_create(i, array[1], array, array[1:2]) in foo() 53 #pragma acc parallel present(i, array[1], array, array[1:2]) in foo() 56 #pragma acc parallel no_create(i, array[1], array, array[1:2]) present(i, array[1], array, array[1:… in foo() 60 …allel copyin(i, array[1], array, array[1:2]) pcopyin(readonly:i, array[1], array, array[1:2]) pres… in foo() [all …]
|
| /llvm-project/mlir/test/Conversion/ArithToLLVM/ |
| H A D | convert-nd-vector-to-llvmir.mlir | 5 // CHECK: llvm.mlir.undef : !llvm.array<2 x array<2 x vector<2xf32>>> 8 // CHECK-NEXT: llvm.extractvalue %{{.*}}[0, 0] : !llvm.array<2 x array<2 x vector<2xf32>>> 9 // CHECK-NEXT: llvm.extractvalue %{{.*}}[0, 0] : !llvm.array<2 x array<2 x vector<2xf32>>> 11 // CHECK-NEXT: llvm.insertvalue %{{.*}}[0, 0] : !llvm.array<2 x array<2 x vector<2xf32>>> 14 // CHECK: llvm.extractvalue %{{.*}}[0, 1] : !llvm.array<2 x array<2 x vector<2xf32>>> 15 // CHECK: llvm.insertvalue %{{.*}}[0, 1] : !llvm.array<2 x array<2 x vector<2xf32>>> 16 // CHECK: llvm.extractvalue %{{.*}}[1, 0] : !llvm.array<2 x array<2 x vector<2xf32>>> 17 // CHECK: llvm.insertvalue %{{.*}}[1, 0] : !llvm.array<2 x array<2 x vector<2xf32>>> 18 // CHECK: llvm.extractvalue %{{.*}}[1, 1] : !llvm.array<2 x array<2 x vector<2xf32>>> 19 // CHECK: llvm.insertvalue %{{.*}}[1, 1] : !llvm.array<2 x array<2 x vector<2xf32>>> [all …]
|
| /llvm-project/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ |
| H A D | increment.pass.cpp | 50 std::array<int, 5> array{0, 1, 2, 3, 4}; in test() local 51 FilterView view = make_filter_view(array.data(), array.data() + array.size(), EqualTo{1}); in test() 57 assert(base(result.base()) == array.data() + array.size()); in test() 62 std::array<int, 5> array{99, 1, 99, 1, 99}; in test() local 63 FilterView view = make_filter_view(array.data(), array.data() + array.size(), EqualTo{1}); in test() 67 assert(base(it.base()) == array.data() + 3); in test() 72 std::array<int, 5> array{99, 1, 99, 99, 1}; in test() local 73 FilterView view = make_filter_view(array.data(), array.data() + array.size(), EqualTo{1}); in test() 77 assert(base(it.base()) == array.data() + 4); in test() 82 std::array<int, 10> array{0, 1, 2, 3, 1, 1, 4, 5, 1, 6}; in test() local [all …]
|
| /llvm-project/compiler-rt/test/asan/TestCases/ |
| H A D | strtoll_strict.c | 34 void test1(char *array, char *endptr) { in test1() argument 36 long long r = strtoll(array, &endptr, 3); in test1() 37 assert(array + 2 == endptr); in test1() 41 void test2(char *array, char *endptr) { in test2() argument 43 array[2] = 'z'; in test2() 44 long long r = strtoll(array, &endptr, 35); in test2() 45 assert(array + 2 == endptr); in test2() 49 void test3(char *array, char *endptr) { in test3() argument 51 memset(array, 0, 8); in test3() 52 ASAN_POISON_MEMORY_REGION(array, 8); in test3() [all …]
|
| H A D | strtol_strict.c | 35 void test1(char *array, char *endptr) { in test1() 37 long r = strtol(array, &endptr, 3); in test1() 38 assert(array + 2 == endptr); 42 void test2(char *array, char *endptr) { in test2() 44 array[2] = 'z'; in test2() 45 long r = strtol(array, &endptr, 35); in test2() 46 assert(array + 2 == endptr); 50 void test3(char *array, char *endptr) { in test3() 61 memset(array, 0, 8); in test3() 62 ASAN_POISON_MEMORY_REGION(array, in test3() 32 test1(char * array,char * endptr) test1() argument 39 test2(char * array,char * endptr) test2() argument 47 test3(char * array,char * endptr) test3() argument 65 test4(char * array,char * endptr) test4() argument 80 test5(char * array,char * endptr) test5() argument 89 test6(char * array,char * endptr) test6() argument 98 test7(char * array,char * endptr) test7() argument 107 char* array = array0 + 8; main() local [all...] |
| /llvm-project/flang/test/Fir/ |
| H A D | array-copies-pointers.fir | 1 // Test array-copy-value pass (copy elision) with array assignment 4 // RUN: fir-opt %s --array-value-copy -split-input-file | FileCheck --check-prefixes=ALL,NOOPT %s 5 // RUN: fir-opt %s --array-value-copy="optimize-conflicts=true" -split-input-file | FileCheck --check-prefixes=ALL,OPT %s 7 // Test `pointer(:) = array(:)` 9 // ALL: %[[ALLOC:.*]] = fir.allocmem !fir.array<100xf32> 13 // ALL: fir.freemem %[[ALLOC]] : !fir.heap<!fir.array<100xf32>> 14 func.func @maybe_overlap(%arg0: !fir.ptr<!fir.array<100xf32>>, %arg1 : !fir.ref<!fir.array<100xf32>> {fir.target}) { 21 %2 = fir.array_load %arg0(%1) : (!fir.ptr<!fir.array<10 [all...] |
| H A D | global-initialization.fir | 4 fir.global internal @_QEmask : !fir.array<32xi32> { 6 %0 = fir.undefined !fir.array<32xi32> 7 …%2 = fir.insert_on_range %0, %c0_i32 from (0) to (31) : (!fir.array<32xi32>, i32) -> !fir.array<32… 8 fir.has_value %2 : !fir.array<32xi32> 11 // CHECK: llvm.mlir.global internal @_QEmask() {addr_space = 0 : i32} : !llvm.array<32 x i32> { 13 // CHECK: [[VAL1:%.*]] = llvm.mlir.undef : !llvm.array<32 x i32> 14 // CHECK: [[VAL2:%.*]] = llvm.mlir.constant(dense<1> : vector<32xi32>) : !llvm.array<32 x i32> 15 // CHECK: llvm.return [[VAL2]] : !llvm.array<32 x i32> 18 fir.global internal @_QEmultiarray : !fir.array<32x32xi32> { 20 %0 = fir.undefined !fir.array<32x32xi32> [all …]
|
| /llvm-project/mlir/test/python/ir/ |
| H A D | array_attributes.py | 20 # Tests of the array/buffer .get() factory method on unsupported dtype. 27 array = np.array([["hello", "goodbye"]]) 29 attr = DenseElementsAttr.get(array) 31 # CHECK: unimplemented array format conversion from format: 38 array = np.array([[1, 2, 3], [4, 5, 6]], dtype=np.int64) 44 attr = DenseElementsAttr.get(array.view(np.datetime64), 50 print(np.array(attr)) 205 array [all...] |
| /llvm-project/llvm/test/Transforms/InferAlignment/ |
| H A D | gep-array.ll | 11 ; Every element in the @array.simple array is 16-byte aligned so any access from 15 @array.simple = global [4 x %pair.simple] zeroinitializer, align 16 20 ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [4 x %pair.simple], ptr @array.simple, i64 0,… 25 %gep = getelementptr inbounds [4 x %pair.simple], ptr @array.simple, i64 0, i64 %idx, i32 1 37 %pair.array = type { [3 x i32], [3 x i32] } 38 @array.array = internal global [3 x %pair.array] zeroinitializer 42 ; CHECK-NEXT: [[X_0:%.*]] = load i32, ptr @array.array, align 16 43 ; CHECK-NEXT: [[X_1:%.*]] = load i32, ptr getelementptr ([3 x %pair.array], ptr @array.array, i6… 44 ; CHECK-NEXT: [[X_2:%.*]] = load i32, ptr getelementptr ([3 x %pair.array], ptr @array.array, i6… 45 ; CHECK-NEXT: [[X_3:%.*]] = load i32, ptr getelementptr ([3 x %pair.array], ptr @array.array, i6… [all …]
|
| /llvm-project/clang/test/Sema/ |
| H A D | warn-char-subscripts.cpp | 4 int array[1] = { 0 }; in t1() local 6 int val = array[subscript]; // expected-warning{{array subscript is of type 'char'}} in t1() 10 int array[1] = { 0 }; in t2() local 12 int val = subscript[array]; // expected-warning{{array subscript is of type 'char'}} in t2() 16 int *array = 0; in t3() local 18 int val = array[subscript]; // expected-warning{{array subscript is of type 'char'}} in t3() 22 int *array = 0; in t4() local 24 int val = subscript[array]; // expected-warning{{array subscript is of type 'char'}} in t4() 29 int *array = 0; in t5() local 30 int val = array[returnsChar()]; // expected-warning{{array subscript is of type 'char'}} in t5() [all …]
|
| H A D | transpose-memset.c | 8 int array[10]; variable 12 …memset(array, sizeof(array), 0); // expected-warning{{'size' argument to memset is '0'; did you me… in main() 13 …memset(array, sizeof(array), 0xff); // expected-warning{{setting buffer to a 'sizeof' expression; … in main() 14 …memset(array, sizeof(array), '\0'); // expected-warning{{'size' argument to memset is '0'; did you… in main() 21 memset(array, sizeof(array), sizeof(array)); // Uh... fine I guess. in main() 22 memset(array, 0, sizeof(array)); in main() 24 memset(array, (int)sizeof(array), (0)); // no warning in main() 25 memset(array, (int)sizeof(array), 32); // no warning in main() 26 memset(array, 32, (0)); // no warning in main() 27 memset(array, 0, 0); // no warning in main() [all …]
|
| H A D | warn-char-subscripts.c | 5 int array[1] = { 0 }; in t1() local 7 int val = array[subscript]; // expected-warning{{array subscript is of type 'char'}} in t1() 11 int array[1] = { 0 }; in t2() local 13 int val = subscript[array]; // expected-warning{{array subscript is of type 'char'}} in t2() 17 int *array = 0; in t3() local 19 int val = array[subscript]; // expected-warning{{array subscript is of type 'char'}} in t3() 23 int *array = 0; in t4() local 25 int val = subscript[array]; // expected-warning{{array subscript is of type 'char'}} in t4() 30 int *array = 0; in t5() local 31 int val = array[returnsChar()]; // expected-warning{{array subscript is of type 'char'}} in t5() [all …]
|
| H A D | warn-tautological-compare.c | 22 int array[2]; variable 25 if (!array) { // expected-warning {{address of array 'array' will always evaluate to 'true'}} in test1() 26 return array[0]; in test1() 27 …} else if (array != 0) { // expected-warning {{comparison of array 'array' not equal to a null poi… in test1() 28 return array[1]; in test1() 30 …if (array == 0) // expected-warning {{comparison of array 'array' equal to a null pointer is alway… in test1() 54 if (array) { } // expected-warning {{address of array 'array' will always evaluate to 'true'}} in test3() 55 …if (array != 0) {} // expected-warning {{comparison of array 'array' not equal to a null pointer i… in test3() 56 if (!array) { } // expected-warning {{address of array 'array' will always evaluate to 'true'}} in test3() 57 …if (array == 0) {} // expected-warning {{comparison of array 'array' equal to a null pointer is al… in test3() [all …]
|
| /llvm-project/clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/ |
| H A D | p3.cpp | 8 extern "C" int array[]; 9 void declare() { extern int array[100]; } in declare() 10 …int value1 = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete t… 11 extern "C" int array[]; 12 …int value2 = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete t… 16 extern "C" int array[]; 18 { extern int array[100]; } in test() 19 extern int array[]; in test() 20 …int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type '… in test() 25 void declare() { extern int array[100]; } in declare() [all …]
|
| /llvm-project/flang/runtime/ |
| H A D | reduce.cpp | 23 RT_API_ATTRS ReduceAccumulator(const Descriptor &array, Operation operation, in ReduceAccumulator() argument 25 : array_{array}, operation_{operation}, identity_{identity}, in ReduceAccumulator() 64 RT_API_ATTRS BufferedReduceAccumulator(const Descriptor &array, OP operation, in BufferedReduceAccumulator() argument 66 : array_{array}, operation_{operation}, identity_{identity}, in BufferedReduceAccumulator() 112 std::int8_t RTDEF(ReduceInteger1Ref)(const Descriptor &array, in RTDEF() 117 return GetTotalReduction<TypeCategory::Integer, 1>(array, source, line, dim, in RTDEF() 120 array, operation, identity, terminator}, in RTDEF() 123 std::int8_t RTDEF(ReduceInteger1Value)(const Descriptor &array, in RTDEF() 128 return GetTotalReduction<TypeCategory::Integer, 1>(array, source, line, dim, in RTDEF() 131 array, operatio in RTDEF() [all...] |
| /llvm-project/lldb/source/Host/macosx/cfcpp/ |
| H A D | CFCMutableArray.cpp | 34 CFMutableArrayRef array = get(); in GetCount() local 35 if (array) in GetCount() 36 return ::CFArrayGetCount(array); in GetCount() 42 CFMutableArrayRef array = get(); in GetCountOfValue() local 43 if (array) in GetCountOfValue() 44 return ::CFArrayGetCountOfValue(array, range, value); in GetCountOfValue() 49 CFMutableArrayRef array = get(); in GetCountOfValue() local 50 if (array) in GetCountOfValue() 51 return ::CFArrayGetCountOfValue(array, CFRangeMake(0, GetCount()), value); in GetCountOfValue() 56 CFMutableArrayRef array = get(); in GetValueAtIndex() local [all …]
|
| /llvm-project/libcxx/test/std/containers/sequences/array/array.cons/ |
| H A D | initialization.pass.cpp | 27 std::array<T, 0> a0; (void)a0; in operator ()() 35 std::array<T, 1> a1; in operator ()() 37 std::array<T, 2> a2; in operator ()() 39 std::array<T, 3> a3; in operator ()() 43 std::array<NoDefault, 0> nodefault; (void)nodefault; in operator ()() 50 const std::array<T, 0> a0; (void)a0; in operator ()() 51 const std::array<NoDefault, 0> nodefault; (void)nodefault; in operator ()() 58 std::array<T, 0> a0_0{}; (void)a0_0; in operator ()() 61 std::array<T, 1> a1_0{}; (void)a1_0; in operator ()() 62 std::array<T, 1> a1_1{T()}; (void)a1_1; in operator ()() [all …]
|
| H A D | implicit_copy.pass.cpp | 40 typedef std::array<double, 3> Array; in tests() 41 Array array = {1.1, 2.2, 3.3}; in tests() local 42 Array copy = array; in tests() 43 copy = array; in tests() 48 typedef std::array<double const, 3> Array; in tests() 49 Array array = {1.1, 2.2, 3.3}; in tests() local 50 Array copy = array; (void)copy; in tests() 55 typedef std::array<double, 0> Array; in tests() 56 Array array = {}; in tests() local 57 Array copy = array; in tests() [all …]
|
| /llvm-project/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/ |
| H A D | stable_sort.pass.cpp | 88 int* array = new int[N]; test_larger_sorts() local
|
| /llvm-project/flang/test/Analysis/AliasAnalysis/ |
| H A D | alias-analysis-host-assoc.fir | 15 …_QFtest1Pinner(%arg0: !fir.ref<!fir.array<10xi32>> {fir.bindc_name = "y"}, %arg1: !fir.ref<tuple<!… 17 …f %arg1, %c0_i32 : (!fir.ref<tuple<!fir.box<!fir.array<10xi32>>>>, i32) -> !fir.ref<!fir.box<!fir.… 18 %1 = fir.load %0 : !fir.ref<!fir.box<!fir.array<10xi32>>> 19 %2 = fir.box_addr %1 : (!fir.box<!fir.array<10xi32>>) -> !fir.ref<!fir.array<10xi32>> 21 %3:3 = fir.box_dims %1, %c0 : (!fir.box<!fir.array<10xi32>>, index) -> (index, index, index) 23 … = "_QFtest1Ex"} : (!fir.ref<!fir.array<10xi32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<10xi32>>,… 26 …Ftest1FinnerEy"} : (!fir.ref<!fir.array<10xi32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<10xi32>>,… 28 …%8 = hlfir.designate %7#0 (%c1) {test.ptr = "test1_y(1)"} : (!fir.ref<!fir.array<10xi32>>, index) … 31 …%10 = hlfir.designate %5#0 (%c1_0) {test.ptr = "test1_x(1)"} : (!fir.ref<!fir.array<10xi32>>, inde… 50 …g0: !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>> {fir.bindc_name = "y"}, %arg1: !fir.ref<tuple<… [all …]
|
| /llvm-project/libcxx/test/std/ranges/range.adaptors/range.chunk.by/range.chunk.by.iter/ |
| H A D | increment.pass.cpp | 49 std::array array{0, 1, 2, 3, 4}; in test() local 50 ChunkByView view = make_chunk_by_view(array); in test() 61 std::array array{1, 2, 3, -1, -2, -3}; in test() local 62 int const* second_chunk = array.data() + 3; in test() 63 ChunkByView view = make_chunk_by_view(array); in test() 72 std::array array{1, 2, 3, 4, 1}; in test() local 73 ChunkByView view = make_chunk_by_view(array); in test() 77 assert(base((*it).begin()) == array.data() + 4); in test() 82 std::array array{0, 1, 0, 2, 0, 3, 0, 4}; in test() local 83 ChunkByView view = make_chunk_by_view(array); in test() [all …]
|