| /llvm-project-15.0.7/clang/test/CXX/expr/expr.prim/expr.prim.req/ |
| H A D | type-requirement.cpp | 7 template<typename T> struct identity { using type = T; }; argument 20 static_assert(requires { typename identity<A>; }); 21 static_assert(!requires { typename identity; }); 23 static_assert(!requires { typename ::identity; }); 43 static_assert(requires { typename identity<int>::type; typename ::identity<int>::type; }); 44 static_assert(!requires { typename identity<int>::typr; }); // expected-error{{no type named 'typr'… 45 static_assert(!requires { typename ::identity<int>::typr; }); // expected-error{{no type named 'typ… 57 using r1i1 = r1<identity<int>>; 70 template<typename... Ts> requires requires { typename identity<Ts...>; } // expected-note{{because … 78 template<typename T, typename U> struct identity {}; struct [all …]
|
| H A D | equivalence.cpp | 6 template<typename T> struct identity { using type = T; }; struct 19 template<typename Y> requires requires { typename identity<Y>::type; } 21 template<typename U> requires requires { typename identity<U>::type; } 23 template<typename T> requires requires { typename ::identity<T>::type; } // expected-note 2{{previo… 25 template<typename T> requires requires { typename identity<T>::typr; } // expected-error{{requires … 28 template<typename T> struct identity { using type = T; }; struct 30 template<typename T> requires requires { typename ns::identity<T>::type; } // expected-error{{requi… argument 33 template<typename T> requires requires { typename T::template identity<T>::type; } 35 template<typename U> requires requires { typename U::template identity<U>::type; } // expected-note…
|
| /llvm-project-15.0.7/flang/lib/Evaluate/ |
| H A D | fold-reduction.h | 35 ActualArguments &arg, std::optional<int> &dim, const Scalar<T> &identity, 62 elements = std::vector<typename Constant<T>::Element>(n, identity); 71 return Constant<T>{static_cast<ConstantSubscript>(identity.size()), 89 std::optional<int> &dim, const Scalar<T> &identity, in DoReduction() argument 103 elements.push_back(identity); in DoReduction() 109 elements.push_back(identity); in DoReduction() 116 return {static_cast<ConstantSubscript>(identity.size()), in DoReduction() 126 RelationalOperator opr, const Scalar<T> &identity) { in FoldMaxvalMinval() argument 145 return Expr<T>{DoReduction<T>(*array, dim, identity, accumulator)}; in FoldMaxvalMinval() 153 FoldingContext &context, FunctionRef<T> &&ref, Scalar<T> identity) { in FoldProduct() argument [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/numerics/numeric.ops/transform.reduce/ |
| H A D | transform_reduce_iter_iter_init_bop_uop.pass.cpp | 29 struct identity struct 61 test(Iter(ia), Iter(ia), 0, std::plus<>(), identity(), 0); in test() 62 test(Iter(ia), Iter(ia), 1, std::multiplies<>(), identity(), 1); in test() 63 test(Iter(ia), Iter(ia+1), 0, std::multiplies<>(), identity(), 0); in test() 64 test(Iter(ia), Iter(ia+1), 2, std::plus<>(), identity(), 3); in test() 65 test(Iter(ia), Iter(ia+2), 0, std::plus<>(), identity(), 3); in test() 66 test(Iter(ia), Iter(ia+2), 3, std::multiplies<>(), identity(), 6); in test() 67 test(Iter(ia), Iter(ia+sa), 4, std::multiplies<>(), identity(), 2880); in test() 68 test(Iter(ia), Iter(ia+sa), 4, std::plus<>(), identity(), 25); in test() 86 decltype(std::transform_reduce(p, p, Init{}, std::plus<>(), identity()))> ); in test_return_type()
|
| /llvm-project-15.0.7/clang/test/CodeGenCXX/ |
| H A D | mangle-variadic-templates.cpp | 6 template<typename T> struct identity { using type = T; }; argument 55 template<typename R, typename ...ArgTypes> identity<R(ArgTypes...)> f5() {} in f5() 57 template identity<int(int, float, double)> f5(); 68 template template_tuple<identity, add_reference> f7(); 72 template void f8<int, identity<int>, identity<float>>(int (&)[6]);
|
| /llvm-project-15.0.7/libcxx/include/ |
| H A D | algorithm | 420 class Proj1 = identity, class Proj2 = identity> 459 class Proj1 = identity, class Proj2 = identity> 602 class Proj1 = identity, class Proj2 = identity, 677 class Proj1 = identity, class Proj2 = identity> 708 class Proj1 = identity, class Proj2 = identity> 726 class Proj1 = identity, class Proj2 = identity> 734 class Proj1 = identity, class Proj2 = identity> 804 class Proj1 = identity, class Proj2 = identity, 812 class Proj1 = identity, class Proj2 = identity> 819 class Proj1 = identity, class Proj2 = identity> [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/ |
| H A D | indirectly_comparable.compile.pass.cpp | 28 static_assert(!std::indirectly_comparable<int**, int*, std::less<int>, std::identity, Deref>); 29 static_assert( std::indirectly_comparable<int*, int**, std::less<int>, std::identity, Deref>); 37 …direct_binary_predicate<F, std::projected<int*, std::identity>, std::projected<char*, std::identit… 41 …direct_binary_predicate<F, std::projected<int*, std::identity>, std::projected<char*, std::identit…
|
| /llvm-project-15.0.7/libcxx/test/libcxx/depr/depr.function.objects/ |
| H A D | depr.adaptors.cxx1z.pass.cpp | 24 int identity(int v) { return v; } in identity() function 31 int identity(int v) const { return v; } in identity() function 41 (std::is_same<PUF, decltype((std::ptr_fun<int, int>(identity)))>::value), in main() 47 assert((std::ptr_fun<int, int>(identity)(4) == 4)); in main() 51 assert((std::mem_fn(&Foo::identity)(f, 5) == 5)); in main() 64 assert((std::mem_fun_ref(&Foo::identity)(f, 5) == 5)); in main()
|
| H A D | adaptors.depr_in_cxx11.verify.cpp | 19 int identity(int v) { return v; } in identity() function 26 int identity(int v) { return v; } in identity() function 33 std::ptr_fun<int, int>(identity); // expected-warning {{'ptr_fun<int, int>' is deprecated}} in main() 41 …std::mem_fun<int, Foo, int>(&Foo::identity); // expected-warning {{'mem_fun<int, Foo, int>' is dep… in main() 50 …std::mem_fun_ref<int, Foo, int>(&Foo::identity); // expected-warning {{'mem_fun_ref<int, Foo, int>… in main()
|
| /llvm-project-15.0.7/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/ |
| H A D | p14.cpp | 3 template<typename T> struct identity; 23 typedef identity<T(Types...)> function_pack_1; 24 …typedef identity<T(Types......)> variadic_function_pack_1; // expected-warning {{varargs}} expecte… 25 typedef identity<T(T...)> variadic_1;
|
| /llvm-project-15.0.7/clang/test/SemaTemplate/ |
| H A D | address-spaces.cpp | 63 template<typename T> struct identity {}; struct 66 identity<T> accept_arg_in_address_space_1(__attribute__((address_space(1))) T &ir1); 69 identity<T> accept_any_arg(T &ir1); 73 identity<int> ii = accept_arg_in_address_space_1(int_1); in test_arg_in_address_space_1() 74 identity<int __attribute__((address_space(1)))> ii2 = accept_any_arg(int_1); in test_arg_in_address_space_1()
|
| H A D | instantiate-method.cpp | 11 int identity(int x) { return x; } in identity() function 16 xf->f(&identity); in test() 17 xf->g(identity); in test() 19 X<int(int)>::h(identity, &identity); in test()
|
| H A D | temp_arg_template.cpp | 86 struct identity {}; 95 struct S : public template_tuple<identity, identity> { 101 f7<identity>();
|
| /llvm-project-15.0.7/libcxx/test/std/concepts/concepts.lang/concept.same/ |
| H A D | same_as.pass.cpp | 66 struct identity { struct 70 template <template <typename> class Modifier = identity> argument 221 CheckNotSameAs<identity, std::add_lvalue_reference>(); in main() 222 CheckNotSameAs<std::add_lvalue_reference, identity>(); in main() 225 CheckNotSameAs<identity, std::add_rvalue_reference>(); in main() 229 CheckNotSameAs<identity, std::add_const>(); in main() 230 CheckNotSameAs<std::add_const, identity>(); in main() 233 CheckNotSameAs<identity, std::add_volatile>(); in main() 234 CheckNotSameAs<std::add_volatile, identity>(); in main() 237 CheckNotSameAs<identity, std::add_cv>(); in main() [all …]
|
| /llvm-project-15.0.7/llvm/test/tools/llvm-ml/ |
| H A D | macro_function.asm | 5 identity MACRO arg macro 12 mov eax, identity(2) 21 mov eax, identity((3)) 23 mov eax, identity(((4-1)-1)) 53 mov eax, identity(identity(1))
|
| /llvm-project-15.0.7/clang/test/Parser/ |
| H A D | cxx2a-concepts-requires-expr.cpp | 61 template<typename T> struct identity { using type = T; }; struct 66 typename identity<int>::type; 67 typename identity<int>; 80 bool r23 = requires { typename identity<T>::temp<T>; }; 85 typename identity<T>::template temp<T>; 86 …typename identity<T>::template temp; // expected-error{{expected an identifier or template-id afte…
|
| /llvm-project-15.0.7/llvm/unittests/Support/ |
| H A D | ParallelTest.cpp | 54 auto identity = [](uint32_t v) { return v; }; in TEST() local 56 std::plus<uint32_t>(), identity); in TEST() 69 sum = parallelTransformReduce(range, 0U, std::plus<uint32_t>(), identity); in TEST() 73 sum = parallelTransformReduce(range, 0U, std::plus<uint32_t>(), identity); in TEST() 79 sum = parallelTransformReduce(range2, 0U, std::plus<uint32_t>(), identity); in TEST()
|
| /llvm-project-15.0.7/llvm/test/Transforms/SCCP/ |
| H A D | dont-zap-return.ll | 3 define internal {i32, i32} @identity(i32 %patatino) { 9 ; CHECK: define internal { i32, i32 } @identity(i32 %patatino) { 16 %S1 = call {i32, i32} @identity(i32 %pat) 22 ; CHECK-NEXT: %S1 = call { i32, i32 } @identity(i32 %pat)
|
| /llvm-project-15.0.7/libcxx/test/std/utilities/function.objects/func.identity/ |
| H A D | identity.pass.cpp | 20 static_assert(std::semiregular<std::identity>); 21 static_assert(requires { typename std::identity::is_transparent; }); 24 std::identity id; in test() 36 const std::identity idc; in test()
|
| /llvm-project-15.0.7/libcxx/include/__algorithm/ |
| H A D | ranges_includes.h | 43 … class _Proj1 = identity, 44 … class _Proj2 = identity, 67 class _Proj1 = identity, 68 class _Proj2 = identity,
|
| H A D | ranges_find_end.h | 39 class _Proj1 = identity, 40 class _Proj2 = identity> 64 class _Proj1 = identity, 65 class _Proj2 = identity>
|
| H A D | ranges_set_difference.h | 50 class _Proj1 = identity, 51 class _Proj2 = identity> 72 class _Proj1 = identity, 73 class _Proj2 = identity>
|
| H A D | ranges_transform.h | 88 class _Proj = identity> 101 class _Proj = identity> 115 class _Proj1 = identity, 116 class _Proj2 = identity> 138 class _Proj1 = identity, 139 class _Proj2 = identity>
|
| /llvm-project-15.0.7/clang/test/SemaObjCXX/ |
| H A D | arc-templates.mm | 114 template<typename T> struct identity { }; struct 119 template<typename T> identity<T> accept_any_ptr(T*); argument 128 identity<id> res1 = accept_strong_ptr(sip); argument 129 identity<__strong id> res2 = accept_any_ptr(sip); 135 identity<id> res3 = accept_strong_ref(si); 136 identity<__strong id> res4 = accept_any_ref(si); 137 identity<__weak id> res5 = accept_any_ref(wi); 148 identity<A *> res1 = accept_strong_ptr(sip); argument 155 identity<A *> res3 = accept_strong_ref(si); 156 identity<__strong A *> res4 = accept_any_ref(si); [all …]
|
| /llvm-project-15.0.7/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.partial/ |
| H A D | p11.cpp | 11 struct identity { struct 16 T* f2(int, typename identity<T>::type = 0); argument 18 T& f2(U, typename identity<T>::type = 0);
|