/llvm-project/libcxx/test/libcxx/algorithms/ |
H A D | robust_against_cpp20_hostile_iterators.compile.pass.cpp | 68 template <typename It> 70 : IteratorAdaptorBase<Cpp20HostileIterator<It>, It> { in Cpp20HostileIterator() 72 Cpp20HostileIterator(It) {} 82 Cpp20HostileIterator<int*> it; in test() 86 (void) std::adjacent_find(it, it); in test() 87 (void) std::adjacent_find(it, it, pred); in test() 88 (void) std::all_of(it, i in test() 81 Cpp20HostileIterator<int*> it; test() local [all...] |
H A D | pstl.iterator-requirements.verify.cpp | 36 constexpr int const& operator*() const; // prevent it from being an output iterator 42 int* it = nullptr; in f() local 54 …(void)std::copy(pol, non_fwd, non_fwd, it); // expected-error@*:* {{static assertion failed: copy}} in f() 55 …(void)std::copy(pol, it, it, non_fwd); // expected-error@*:* {{static assertion failed: copy}} in f() 56 …(void)std::copy(pol, it, it, non_output); // expected-error@*:* {{static assertion failed: copy}} in f() 59 …(void)std::copy_n(pol, non_fwd, n, it); // expected-error@*:* {{static assertion failed: copy_n… in f() 60 …(void)std::copy_n(pol, it, n, non_fwd); // expected-error@*:* {{static assertion failed: copy_n… in f() 61 …(void)std::copy_n(pol, it, n, non_output); // expected-error@*:* {{static assertion failed: copy_n… in f() 70 …(void)std::equal(pol, non_fwd, non_fwd, it); // expected-error@*:* {{static assertion failed… in f() 71 …(void)std::equal(pol, it, it, non_fwd); // expected-error@*:* {{static assertion failed… in f() [all …]
|
/llvm-project/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/ |
H A D | concept_conformance.compile.pass.cpp | 24 using It = int*; in test() typedef 25 static_assert( std::sentinel_for<std::move_sentinel<It>, std::move_iterator<It>>); in test() 26 static_assert( std::sized_sentinel_for<std::move_sentinel<It>, std::move_iterator<It>>); in test() 27 …tatic_assert( std::sentinel_for<std::move_sentinel<sentinel_wrapper<It>>, std::move_iterator<It>>); in test() 28 …assert(!std::sized_sentinel_for<std::move_sentinel<sentinel_wrapper<It>>, std::move_iterator<It>>); in test() 29 … static_assert( std::sentinel_for<std::move_sentinel<sized_sentinel<It>>, std::move_iterator<It>>); in test() 30 …c_assert( std::sized_sentinel_for<std::move_sentinel<sized_sentinel<It>>, std::move_iterator<It>>); in test() 35 using It = cpp17_input_iterator<int*>; in test() typedef 36 …tatic_assert( std::sentinel_for<std::move_sentinel<sentinel_wrapper<It>>, std::move_iterator<It>>); in test() 37 …assert(!std::sized_sentinel_for<std::move_sentinel<sentinel_wrapper<It>>, std::move_iterator<It>>); in test() [all …]
|
/llvm-project/libcxx/test/std/algorithms/ |
H A D | ranges_robust_against_nonbool.compile.pass.cpp | 31 void f(Iterator it, Range in, Iterator out, std::size_t n, Value const& val, std::initializer_list<Value> ilist) { in f() argument 34 (void)func(it, it, pred); in f() 36 (void)func(it, it, pred, projection); in f() 42 (void)func(it, it, it, it, pred); in f() 44 (void)func(it, i in f() [all...] |
/llvm-project/libcxx/test/std/iterators/predef.iterators/iterators.common/ |
H A D | types.h | 18 template <class It> 21 It it_; 25 typedef typename std::iterator_traits<It>::value_type value_type; 26 typedef typename std::iterator_traits<It>::difference_type difference_type; 27 typedef It pointer; 28 typedef typename std::iterator_traits<It>::reference reference; 30 friend constexpr It base(const simple_iterator& i) {return i.it_;} in base() 33 explicit constexpr simple_iterator(It it) : it_(it) {} in simple_iterator() argument 42 template <class It> 45 It it_; [all …]
|
H A D | iter_move.pass.cpp | 41 using It = int*; in test() typedef 42 using CommonIt = std::common_iterator<It, sentinel_wrapper<It>>; in test() 44 CommonIt it = CommonIt(It(a)); in test() local 45 ASSERT_NOEXCEPT(iter_move(it)); in test() 46 ASSERT_NOEXCEPT(std::ranges::iter_move(it)); in test() 47 ASSERT_SAME_TYPE(decltype(iter_move(it)), int&&); in test() 48 ASSERT_SAME_TYPE(decltype(std::ranges::iter_move(it)), int&&); in test() 49 assert(iter_move(it) == 1); in test() 51 ++it; in test() 52 assert(iter_move(it) == 2); in test() [all …]
|
/llvm-project/llvm/test/MC/ARM/ |
H A D | implicit-it-generation.s | 1 @ RUN: llvm-mc -triple thumbv7a--none-eabi -arm-implicit-it=always < %s -show-encoding | FileCheck … 7 @ CHECK: it eq 43 @ CHECK: it eq 45 @ CHECK: it lt 47 @ CHECK: it eq 49 @ CHECK: it ge 78 @ CHECK: it eq 81 @ CHECK: it eq 84 @ CHECK: it eq 99 @ CHECK: it eq [all …]
|
H A D | thumb2-narrow-dp.ll | 24 IT EQ 25 // CHECK: it eq @ encoding: [0x08,0xbf] 28 IT EQ 29 // CHECK: it eq @ encoding: [0x08,0xbf] 33 IT EQ 34 // CHECK: it eq @ encoding: [0x08,0xbf] 37 IT EQ 38 // CHECK: it eq @ encoding: [0x08,0xbf] 50 IT EQ 51 // CHECK: it eq @ encoding: [0x08,0xbf] [all …]
|
H A D | unpred-control-flow-in-it-block.s | 4 @ an IT block, but not the last instruction in the block. 8 …E-1]]:{{[0-9]+}}: error: instruction must be outside of IT block or the last instruction in an IT … 10 …E-1]]:{{[0-9]+}}: error: instruction must be outside of IT block or the last instruction in an IT … 12 …E-1]]:{{[0-9]+}}: error: instruction must be outside of IT block or the last instruction in an IT … 16 …E-1]]:{{[0-9]+}}: error: instruction must be outside of IT block or the last instruction in an IT … 18 …E-1]]:{{[0-9]+}}: error: instruction must be outside of IT block or the last instruction in an IT … 20 …E-1]]:{{[0-9]+}}: error: instruction must be outside of IT block or the last instruction in an IT … 24 …E-1]]:{{[0-9]+}}: error: instruction must be outside of IT block or the last instruction in an IT … 26 …E-1]]:{{[0-9]+}}: error: instruction must be outside of IT block or the last instruction in an IT … 28 …E-1]]:{{[0-9]+}}: error: instruction must be outside of IT block or the last instruction in an IT … [all …]
|
/llvm-project/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ |
H A D | increment.pass.cpp | 57 recursive_directory_iterator it(testDir, ec); in test_prefix_increment() local 62 assert(it != endIt); in test_prefix_increment() 63 const path entry = *it; in test_prefix_increment() 65 recursive_directory_iterator& it_ref = ++it; in test_prefix_increment() 66 assert(&it_ref == &it); in test_prefix_increment() 69 assert(it == endIt); in test_prefix_increment() 81 recursive_directory_iterator it(testDir, ec); in test_postfix_increment() local 86 assert(it != endIt); in test_postfix_increment() 87 const path entry = *it; in test_postfix_increment() 89 const path entry2 = *it++; in test_postfix_increment() [all …]
|
H A D | copy_assign.pass.cpp | 32 // in a non-default state. The returned 'it' is in a in createInterestingIterator() 34 // it.options() == directory_options::skip_permission_denied in createInterestingIterator() 35 // it.depth() == 1 in createInterestingIterator() 36 // it.recursion_pending() == true in createInterestingIterator() 40 recursive_directory_iterator it(testDir, in createInterestingIterator() local 42 assert(it != endIt); in createInterestingIterator() 43 while (it.depth() != 1) { in createInterestingIterator() 44 ++it; in createInterestingIterator() 45 assert(it != endIt); in createInterestingIterator() 47 assert(it.depth() == 1); in createInterestingIterator() [all …]
|
H A D | recursion_pending.pass.cpp | 33 recursive_directory_iterator it(static_env.Dir); in initial_value_test() local 34 assert(it.recursion_pending() == true); in initial_value_test() 45 recursive_directory_iterator it(rec_pending_it); in value_after_copy_construction_and_assignment_test() local 46 assert(it.recursion_pending() == true); in value_after_copy_construction_and_assignment_test() 47 it.disable_recursion_pending(); in value_after_copy_construction_and_assignment_test() 54 recursive_directory_iterator it(static_env.Dir); in value_after_copy_construction_and_assignment_test() local 55 it.disable_recursion_pending(); in value_after_copy_construction_and_assignment_test() 56 it = rec_pending_it; in value_after_copy_construction_and_assignment_test() 57 assert(it.recursion_pending() == true); in value_after_copy_construction_and_assignment_test() 58 it.disable_recursion_pending(); in value_after_copy_construction_and_assignment_test() [all …]
|
H A D | move_assign.pass.cpp | 31 // the directory iterators. Turn off this warning so we can test it. 36 // in a non-default state. The returned 'it' is in a in createInterestingIterator() 38 // it.options() == directory_options::skip_permission_denied in createInterestingIterator() 39 // it.depth() == 1 in createInterestingIterator() 40 // it.recursion_pending() == true in createInterestingIterator() 44 recursive_directory_iterator it(testDir, in createInterestingIterator() local 46 assert(it != endIt); in createInterestingIterator() 47 while (it.depth() != 1) { in createInterestingIterator() 48 ++it; in createInterestingIterator() 49 assert(it != endIt); in createInterestingIterator() [all …]
|
/llvm-project/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/ |
H A D | iterator_sentinel.pass.cpp | 24 template<class It, class Sent> 26 static_assert(std::sentinel_for<Sent, It> && !std::sized_sentinel_for<Sent, It>); in test_unsized() 29 It first = It(a); in test_unsized() 30 auto last = Sent(It(a)); in test_unsized() 32 assert(std::ranges::distance(It(a), last) == 0); in test_unsized() 33 assert(std::ranges::distance(first, Sent(It(a))) == 0); in test_unsized() 34 assert(std::ranges::distance(It(a), Sent(It( in test_unsized() 196 using It = cpp20_input_iterator<int*>; // non-copyable, thus not a sentinel for itself test() typedef 205 using It = cpp20_input_iterator<int*>; // non-copyable test() typedef 216 using It = cpp17_input_iterator<int*>; // not a sentinel for itself test() typedef [all...] |
/llvm-project/clang/test/Driver/ |
H A D | arm-target-as-mimplicit-it.s | 2 /// -Wa,-implicit-it= 3 // RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS 4 // RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=never %s 2>&1 | FileCheck %s --check-prefix=NEVER 5 // RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=arm %s 2>&1 | FileCheck %s --check-prefix=ARM 6 // RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=thumb %s 2>&1 | FileCheck %s --check-prefix=THUMB 7 /// -Xassembler -mimplicit-it= 8 // RUN: %clang -target arm-linux-gnueabi -### -Xassembler -mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS 9 // RUN: %clang -target arm-linux-gnueabi -### -Xassembler -mimplicit-it=never %s 2>&1 | FileCheck %s --check-prefix=NEVER 10 // RUN: %clang -target arm-linux-gnueabi -### -Xassembler -mimplicit-it=arm %s 2>&1 | FileCheck %s --check-prefix=ARM 11 // RUN: %clang -target arm-linux-gnueabi -### -Xassembler -mimplicit-it [all...] |
/llvm-project/libcxx/test/std/containers/ |
H A D | iterator.rel_ops.compile.pass.cpp | 41 template<class It, class ConstIt> in test_eq() 42 void test_eq(It it, ConstIt cit) { in test_eq() 43 (void)(it == it); in test_eq() 44 (void)(it != it); in test_eq() 45 (void)(it == cit); in test_eq() 46 (void)(it != cit); in test_eq() 47 (void)(cit == it); in test_eq() 40 test_eq(It it,ConstIt cit) test_eq() argument 52 test_lt(It it,ConstIt cit) test_lt() argument 85 typename Container::iterator it = c.begin(); test_forward() local 93 typename Container::iterator it = c.begin(); test_random_access() local 117 std::filesystem::directory_iterator it; test_directory_iterators() local 135 std::span<int>::iterator it = c.begin(); // span has no const_iterator test_span() local [all...] |
/llvm-project/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ |
H A D | increment.pass.cpp | 35 auto it = v.begin(); in test() local 36 using Iter = decltype(it); in test() 38 assert(&(std::get<0>(*it)) == &(a[0])); in test() 39 assert(&(std::get<1>(*it)) == &(b[0])); in test() 40 assert(std::get<2>(*it) == 0); in test() 42 static_assert(std::is_same_v<decltype(++it), Iter&>); in test() 44 auto& it_ref = ++it; in test() 45 assert(&it_ref == &it); in test() 47 assert(&(std::get<0>(*it)) == &(a[1])); in test() 48 assert(&(std::get<1>(*it)) == &(b[1])); in test() [all …]
|
/llvm-project/clang/test/SemaObjC/ |
H A D | non-trivial-c-union.m | 17 U0 ug0; // expected-error {{cannot default-initialize an object of type 'U0' since it is a union that is non-trivial to default-initialize}} 19 S0 sg0; // expected-error {{cannot default-initialize an object of type 'S0' since it contains a union that is non-trivial to default-initialize}} 21 S0 sg2 = { .f1 = 0 }; // expected-error {{cannot default-initialize an object of type 'U0' since it is a union that is non-trivial to default-initialize}} 23 U0 foo0(U0); // expected-error {{cannot use type 'U0' for a function/method parameter since it is a union that is non-trivial to destruct}} expected-error {{cannot use type 'U0' for a function/method parameter since it is a union that is non-trivial to copy}} expected-error {{cannot use type 'U0' for function/method return since it is a union that is non-trivial to destruct}} expected-error {{cannot use type 'U0' for function/method return since it is a union that is non-trivial to copy}} 24 S0 foo1(S0); // expected-error {{cannot use type 'S0' for a function/method parameter since it contains a union that is non-trivial to destruct}} expected-error {{cannot use type 'S0' for a function/method parameter since it contains a union that is non-trivial to copy}} expected-error {{cannot use type 'S0' for function/method return since it contain [all...] |
/llvm-project/libcxx/test/std/ranges/range.adaptors/range.split/iterator/ |
H A D | increment.pass.cpp | 32 // ++it in testOne() 34 auto it = sv.begin(); in testOne() local 36 decltype(auto) it1 = ++it; in testOne() 38 assert(&it1 == &it); in testOne() 40 assert(base((*it).begin()) == buffer + 4); in testOne() 41 assert(base((*it).end()) == buffer + 6); in testOne() 43 ++it; in testOne() 44 assert(base((*it).begin()) == buffer + 7); in testOne() 45 assert(base((*it).end()) == buffer + 8); in testOne() 48 // it++ in testOne() [all …]
|
/llvm-project/llvm/test/CodeGen/ARM/ |
H A D | 2013-05-05-IfConvertBug.ll | 4 ; RUN: llc < %s -mtriple=thumbv7 -arm-restrict-it | FileCheck -check-prefix=CHECK-RESTRICT-IT %s 15 ; CHECK-NEXT: it eq 34 ; CHECK-V8-NEXT: it eq 45 ; CHECK-RESTRICT-IT-LABEL: t1: 46 ; CHECK-RESTRICT-IT: @ %bb.0: 47 ; CHECK-RESTRICT-IT-NEXT: ldr r3, .LCPI0_0 48 ; CHECK-RESTRICT-IT-NEXT: str r3, [r2] 49 ; CHECK-RESTRICT-IT-NEXT: movs r2, #1 50 ; CHECK-RESTRICT-IT-NEXT: cmp r0, #0 51 ; CHECK-RESTRICT-IT-NEXT: it eq [all …]
|
/llvm-project/clang/test/SemaCXX/ |
H A D | warn-unsafe-buffer-usage-fixits-deref-simple-ptr-arith.cpp | 9 // when it's on the right side 13 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:3-[[@LINE-1]]:8}:"std::span<int> " in basic() 15 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:3-[[@LINE-1]]:5}:"" in basic() 16 // CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:8-[[@LINE-2]]:9}:"[" in basic() 17 // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:10-[[@LINE-3]]:11}:"]" in basic() 23 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:3-[[@LINE-1]]:8}:"std::span<int> " in char_ranges() 26 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:4-[[@LINE-1]]:8}:"" in char_ranges() 27 // CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:9-[[@LINE-2]]:12}:"[" in char_ranges() 28 // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:13-[[@LINE-3]]:15}:"]" in char_ranges() 31 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:4-[[@LINE-1]]:9}:"" in char_ranges() [all …]
|
/llvm-project/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/ |
H A D | iter.pass.cpp | 24 template <class It> 27 static_assert( std::is_constructible<std::move_iterator<It>, const It&>::value, ""); in test() 28 static_assert( std::is_constructible<std::move_iterator<It>, It&&>::value, ""); in test() 29 static_assert(!std::is_convertible<const It&, std::move_iterator<It> >::value, ""); in test() 30 static_assert(!std::is_convertible<It&&, std::move_iterator<It> >::value, ""); in test() 34 It it = It(s); in test() local 35 std::move_iterator<It> r(it); in test() 39 It it = It(s); in test() local 40 std::move_iterator<It> r(std::move(it)); in test() 46 template <class It> [all …]
|
/llvm-project/libcxx/test/support/ |
H A D | test_iterators.h | 28 template <class It> 31 It it_; 38 typedef typename std::iterator_traits<It>::difference_type difference_type; 39 typedef It pointer; in cpp17_output_iterator() argument 40 typedef typename std::iterator_traits<It>::reference reference; 42 TEST_CONSTEXPR explicit cpp17_output_iterator(It it) : it_(std::move(it)) {} in cpp17_output_iterator() 58 friend TEST_CONSTEXPR It base(const cpp17_output_iterator& i) { return i.it_; } 64 template <class It> 82 cpp17_input_iterator(It it) cpp17_input_iterator() argument 126 forward_iterator(It it) forward_iterator() argument 166 bidirectional_iterator(It it) bidirectional_iterator() argument 208 random_access_iterator(It it) random_access_iterator() argument 264 cpp20_random_access_iterator(It it) cpp20_random_access_iterator() argument 360 contiguous_iterator(It it) contiguous_iterator() argument 418 three_way_contiguous_iterator(It it) three_way_contiguous_iterator() argument 647 cpp20_input_iterator(It it) cpp20_input_iterator() argument [all...] |
/llvm-project/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ |
H A D | increment.pass.cpp | 48 // Increment an iterator when it won't find another satisfied value after begin() in test() 53 FilterIterator it = view.begin(); in test() local 54 FilterIterator& result = ++it; in test() 55 ASSERT_SAME_TYPE(FilterIterator&, decltype(++it)); in test() 56 assert(&result == &it); in test() 60 // Increment the iterator and it finds another value after begin() in test() 65 FilterIterator it = view.begin(); in test() local 66 ++it; in test() 67 assert(base(it.base()) == array.data() + 3); in test() 75 FilterIterator it = view.begin(); in test() local [all …]
|
/llvm-project/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/ |
H A D | ranges.binary_search.pass.cpp | 32 template <class It, class Sent = It> 33 concept HasLowerBoundIt = requires(It it, Sent sent) { std::ranges::binary_search(it, sent, 1); }; 50 concept HasLowerBoundPred = requires(int* it, Pred pred) {std::ranges::binary_search(it, it, 1, pre… 56 template <class It, class Sent = It> 61 std::same_as<bool> auto ret = std::ranges::binary_search(It(a), Sent(It(a + 6)), 3); in test_iterators() 66 auto range = std::ranges::subrange(It(a), Sent(It(a + 6))); in test_iterators() 74 assert(std::ranges::binary_search(It(a), Sent(It(a + 6)), 2, std::ranges::greater{})); in test_iterators() 75 auto range = std::ranges::subrange(It(a), Sent(It(a + 6))); in test_iterators() 81 assert(std::ranges::binary_search(It(a), Sent(It(a + 6)), 0, {}, [](int i) { return i - 3; })); in test_iterators() 82 auto range = std::ranges::subrange(It(a), Sent(It(a + 6))); in test_iterators() [all …]
|