Home
last modified time | relevance | path

Searched refs:T (Results 1 – 25 of 7280) sorted by relevance

12345678910>>...292

/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dcxx1y-variable-templates_top_level.cpp17 template<typename T> extern CONST T vc;
38 T circular_area(T r) { in circular_area()
43 CONST T const_circular_area(T r) { in const_circular_area()
87 template<typename T> T v;
98 template<typename T> T v = T();
141 T pi0 = T(3.1415926535897932385);
221 T pi0 = T(3.1415926535897932385);
294 template<typename T> auto var0<T,int> = T();
298 template<typename T> T var<T,int> = T(5);
314 template<typename T> T* var = new T();
[all …]
H A Dcxx1y-variable-templates_in_class.cpp15 template<typename T> static CONST T right<T,int> = 5;
26 template<typename T> static CONST T right<T,int> = T(5);
38 template<typename T> CONST T B1::right<T,int> = T(5);
49 template<typename T> static CONST T right<T,int> = T(5);
52 template<typename T> CONST T B3::right<T,int>;
56 template<typename T> static CONST T a<T,int> = T(100);
61 template<typename T> CONST T B4::a<T,int>;
130 template<typename T> T* C1a::Data<T*> = new T();
137 template<typename T> CONST T* C1b::Data<T*> = (T*)(0);
353 template<class T> template<class U, T N, U M> T&& A<T>::Var = T(N + M);
[all …]
H A Ddelete-and-function-templates.cpp7 template<class T> struct is_same<T, T> { enum { value = true }; };
17 template<class T> decltype(f(T{})) g(T); // this one sfinae's out.
18 template<class T> int *g(T);
25 template<class T> double* f(T);
28 template<class T> decltype(f(T{})) g(T); // expected-note{{candidate}}
41 template<class T> decltype(f(T{})) g(T); // expected-note{{candidate}}
59 template<class T> decltype(X<T>{}.f(T{})) g(T); // expected-note{{candidate}}
93 template<class T, class U> decltype(X<T>{}.f1(U{}, T{})) g1(U, T); // expected-note{{candidate}}
96 template<class T, class U> decltype(X<T>{}.f2(U{}, T{})) g2(U, T); // expected-note2{{candidate}}
117 template < typename T> T* foo (T);
[all …]
H A Dcxx1z-class-template-argument-deduction.cpp16 template<typename T> initializer_list(initializer_list<T>) -> initializer_list<T>;
29 template<typename T> vector(std::initializer_list<T>) -> vector<T>;
31 template<typename T> explicit vector(std::size_t, T) -> vector<T>;
52 template<typename ...T> tuple(tuple<T...>) -> tuple<T...>;
113 template<typename T> C(T) -> C<T>;
114 template<typename T> void g(T a) { in g()
190 template<typename T, T N, template<T (*v)[N]> typename U, T (*X)[N]>
246 template<typename T> X(T, U...);
373 template<typename T> Public(T) -> Public<T>;
555 template<typename T> struct A { A(T); T x; };
[all …]
H A Dunknown-type-name.cpp29 template<typename T>
31 typedef T type;
43 template<typename T>
46 template<typename T>
49 template<typename T>
85 template<typename T> int A<T>::n(T::value); // ok
88 A<T>::m(T::value, 0); // ok
90 template<typename T> int A<T>::h(T::type, int) {} // expected-error{{missing 'typename'}} in h()
91 template<typename T> int A<T>::h(T::type x, char) {} // expected-error{{missing 'typename'}} in h()
96 template<typename T> int junk1(T::junk);
[all …]
/llvm-project-15.0.7/llvm/unittests/ADT/
H A DTripleTest.cpp18 Triple T; in TEST() local
20 T = Triple(""); in TEST()
26 T = Triple("-"); in TEST()
76 Triple T; in TEST() local
951 Triple T; in TEST() local
992 Triple T; in TEST() local
1157 Triple T; in TEST() local
1351 Triple T; in TEST() local
1504 Triple T; in TEST() local
1660 Triple T; in TEST() local
[all …]
/llvm-project-15.0.7/clang/test/PCH/
H A Dcxx1y-variable-templates.cpp37 template<typename T> T var0a = T();
41 template<typename T> T va = T(100);
59 template<typename T> T vb = T();
62 template<typename T> T vc = T();
65 template<typename T> T* vd<T*> = new T();
69 template<typename T> T va = T(10);
73 template<typename T> T vb = T(10);
76 template<typename T> T vc = T(10);
115 template<typename T> T* vd<T*> = new T();
153 template<typename T> T* vb<T*> = new T();
[all …]
/llvm-project-15.0.7/clang/test/SemaTemplate/
H A Dms-lookup-template-base-classes.cpp32 template<class T> void f(T) { in f()
207 template <typename T> struct B : T {
211 int T::*qux() { return &T::a; } in qux()
219 template <typename T> struct C : T {
231 template <typename T> struct D : T {
284 template <typename T> struct B : A<T> {
292 template <typename T> struct B : A<T> {
300 template <typename T> struct B : A<T> {
309 template <typename T> struct C : A<T>, B<T> {
318 template <typename T> struct C : A<T>, B<T> {
[all …]
H A Ddiagnose-enable-if-t.cpp9 template<class T> struct enable_if<true, T> { using type = T; };
16 template<class T, class = std::enable_if_t<sizeof(T) != 1>>
25 std::enable_if_t<sizeof(T) != 1, void> f(T, long);
34 template<class T> struct enable_if<true, T> { using type = T; };
47 __enable_if_t<sizeof(T) != 1, void> f(T, long);
60 template<class T, class = _EnableIf<sizeof(T) != 1>>
69 _EnableIf<sizeof(T) != 1, void> f(T, long);
78 template<class T> struct enable_if<true, T> { using type = T; };
82 template<class T, class = a_pony<sizeof(T) != 1>>
86 template<class T, a_pony<sizeof(T) != 1>* = nullptr>
[all …]
H A Dtemp_class_spec.cpp2 template<typename T>
7 template<typename T>
72 struct is_same<T, T> {
291 template<typename T, typename ValueType = T>
322 template<class T, int I> class A<T, T*, I> { }; //#2
324 template<class T> class A<int, T*, 5> { }; //#4
328 template<typename T, T N, typename U> class A0;
330 template<typename T, T N> class A0<T, N, int> { }; // expected-note{{here}}
331 template<typename T, T N> class A0<T, N, int>;
332 template<typename T, T N> class A0<T, N, int> { }; // expected-error{{redef}}
[all …]
/llvm-project-15.0.7/clang/test/CodeGenCXX/
H A Dmangle-exprs.cpp310 template<class T> decltype(D{b},T()) fD1(T t) {} in fD1()
317 template<class T> decltype(T{}) fT1(T t) {} in fT1()
318 template<class T> decltype(T()) fT2(T t) {} in T() function
319 template<class T> decltype(T{1}) fT3(T t) {} in fT3()
320 template<class T> decltype(T(1)) fT4(T t) {} in fT4()
321 template<class T> decltype(T{1,2}) fT5(T t) {} in fT5()
322 template<class T> decltype(T(1,2)) fT6(T t) {} in fT6()
323 template<class T> decltype(T{{}}) fT7(T t) {} in fT7()
324 template<class T> decltype(T({})) fT8(T t) {} in fT8()
325 template<class T> decltype(T{{1}}) fT9(T t) {} in fT9()
[all …]
/llvm-project-15.0.7/libcxx/test/std/numerics/c.math/
H A Dlerp.pass.cpp26 return std::lerp(T( 0), T(12), T(0)) == T(0) in constexpr_test()
27 && std::lerp(T(12), T( 0), T(0.5)) == T(6) in constexpr_test()
28 && std::lerp(T( 0), T(12), T(2)) == T(24); in constexpr_test()
43 assert((std::lerp(T( 0), T(12), T(0)) == T(0))); in test()
44 assert((std::lerp(T( 0), T(12), T(1)) == T(12))); in test()
45 assert((std::lerp(T(12), T( 0), T(0)) == T(12))); in test()
46 assert((std::lerp(T(12), T( 0), T(1)) == T(0))); in test()
48 assert((std::lerp(T( 0), T(12), T(0.5)) == T(6))); in test()
49 assert((std::lerp(T(12), T( 0), T(0.5)) == T(6))); in test()
50 assert((std::lerp(T( 0), T(12), T(2)) == T(24))); in test()
[all …]
/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/bugprone/
H A Dforwarding-reference-overload.cpp6 template <class T> struct enable_if<true, T> { typedef T type; };
22 template <typename T> Test1(T &&n);
92 template <typename T> Test3(T &&n);
105 template <typename T> Test4(T &&n);
115 template <typename T> Test5(T &&n);
123 template <typename T> Test6(T &&n);
159 template <class T> struct remove_reference<T&> { using type = T; };
160 template <class T> struct remove_reference<T&&> { using type = T; };
163 template <class T> struct remove_cv<const T> { using type = T; };
164 template <class T> struct remove_cv<volatile T> { using type = T; };
[all …]
/llvm-project-15.0.7/libcxx/test/std/utilities/utility/utility.intcmp/
H A Dintcmp.fail.cpp51 template <class T>
53 std::cmp_equal(T(), T()); // expected-error 10-11 {{no matching function for call to 'cmp_equal'}} in test()
59 std::cmp_less(T(), T()); // expected-error 10-11 {{no matching function for call to 'cmp_less'}} in test()
75 template <class T>
77 std::cmp_equal(T(), T()); // expected-error 1 {{no matching function for call to 'cmp_equal'}} in test_char8t()
83 std::cmp_less(T(), T()); // expected-error 1 {{no matching function for call to 'cmp_less'}} in test_char8t()
89 std::cmp_greater(T(), T()); // expected-error 1 {{no matching function for call to 'cmp_greater'}} in test_char8t()
100 template <class T>
102 std::cmp_equal(T(), T()); // expected-error 2 {{no matching function for call to 'cmp_equal'}} in test_uchars()
108 std::cmp_less(T(), T()); // expected-error 2 {{no matching function for call to 'cmp_less'}} in test_uchars()
[all …]
/llvm-project-15.0.7/libcxx/test/std/utilities/function.objects/refwrap/
H A Dunwrap_ref_decay.pass.cpp34 check<T, T>(); in main()
35 check<T&, T>(); in main()
36 check<T const, T>(); in main()
37 check<T const&, T>(); in main()
38 check<T*, T*>(); in main()
39 check<T const*, T const*>(); in main()
40 check<T[3], T*>(); in main()
41 check<T const [3], T const*>(); in main()
42 check<T (), T (*)()>(); in main()
44 check<T (int) &, T (int) &>(); in main()
[all …]
/llvm-project-15.0.7/clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/
H A Dp2.cpp15 X1<T>(int);
34 template<typename T> X1<T>::X1<T> X1<T>::f2() { } // expected-error{{missing 'typename'}} in f2()
35 template<typename T> X1<T>::X1<T> (X1<T>::f2)(int) { } // expected-error{{missing 'typename'}} in X1()
36 template<typename T> struct X1<T>::X1<T> (X1<T>::f2)(float) { } in X1()
37 template<typename T> struct X1<T>::X1 (X1<T>::f2)(double) { } in X1()
101 template <typename T> struct A : T::B {
129 using InhCtor::T::T;
147 using T::T;
179 struct ZT : T::T {
180 using T::T::T;
[all …]
/llvm-project-15.0.7/clang/test/Index/Core/
H A Dindex-dependent-source.cpp13 template<typename T>
18 T baseTemplateField;
28 T function() { } in function()
32 T field;
34 static T variable;
41 typedef T Typedef;
128 template<typename T>
135 template<typename T>
138 template<typename T>
215 void foo(T);
[all …]
/llvm-project-15.0.7/libcxx/test/std/concepts/concepts.lang/concept.commonref/
H A Dcommon_reference.compile.pass.cpp19 template <class T, class U>
21 static_assert(std::common_reference_with<T, U&>); in CheckCommonReferenceWith()
22 static_assert(std::common_reference_with<T, const U&>); in CheckCommonReferenceWith()
25 static_assert(std::common_reference_with<T, U&&>); in CheckCommonReferenceWith()
26 static_assert(std::common_reference_with<T, const U&&>); in CheckCommonReferenceWith()
29 static_assert(std::common_reference_with<T&, U&&>); in CheckCommonReferenceWith()
47 return std::common_reference_with<T, U>; in CheckCommonReferenceWith()
123 class T {}; class
125 static_assert(!std::common_reference_with<T, int>);
126 static_assert(!std::common_reference_with<int, T>);
[all …]
/llvm-project-15.0.7/clang/test/CXX/temp/temp.res/temp.local/
H A Dp6.cpp5 template<typename T, // expected-note {{declared here}}
8 template<typename T> struct Y { // expected-note 18{{declared here}}
27 int T; // expected-error {{declaration of 'T' shadows template parameter}} member
46 int T; // expected-error {{declaration of 'T' shadows template parameter}} in b() local
68 template<int T> struct Z { // expected-note 16{{declared here}}
122 struct T *p; in f()
124 friend struct T;
127 template<typename T> // expected-note {{declared here}}
132 …template<typename T> struct T {}; // expected-error{{declaration of 'T' shadows template paramete… struct
136 template<typename T> void T() {} in T() function
[all …]
/llvm-project-15.0.7/clang/test/CXX/expr/expr.prim/expr.prim.req/
H A Dequivalence.cpp4 template<typename T> constexpr bool is_same_v<T, T> = true;
6 template<typename T> struct identity { using type = T; };
7 template<typename T> using identity_t = T;
10 template<typename T> requires requires { typename identity_t<T>; }
16 template<typename T> requires requires { typename ::identity_t<T>; }
28 template<typename T> struct identity { using type = T; };
33 template<typename T> requires requires { typename T::template identity<T>::type; }
54 template<typename T> requires requires { sizeof(T); }
67 template<typename T> requires requires { { sizeof(T) } -> C1; }
79 template<typename T> requires requires { { sizeof(T) } -> C2<T>; }
[all …]
/llvm-project-15.0.7/libc/test/src/math/
H A DCeilTest.h22 typedef T (*CeilFunc)(T);
35 EXPECT_FP_EQ(T(1.0), func(T(1.0))); in testRoundedNumbers()
36 EXPECT_FP_EQ(T(-1.0), func(T(-1.0))); in testRoundedNumbers()
37 EXPECT_FP_EQ(T(10.0), func(T(10.0))); in testRoundedNumbers()
44 EXPECT_FP_EQ(T(1.0), func(T(0.5))); in testFractions()
45 EXPECT_FP_EQ(T(-0.0), func(T(-0.5))); in testFractions()
46 EXPECT_FP_EQ(T(1.0), func(T(0.115))); in testFractions()
50 EXPECT_FP_EQ(T(2.0), func(T(1.3))); in testFractions()
52 EXPECT_FP_EQ(T(2.0), func(T(1.5))); in testFractions()
54 EXPECT_FP_EQ(T(2.0), func(T(1.75))); in testFractions()
[all …]
H A DFloorTest.h22 typedef T (*FloorFunc)(T);
35 EXPECT_FP_EQ(T(1.0), func(T(1.0))); in testRoundedNumbers()
36 EXPECT_FP_EQ(T(-1.0), func(T(-1.0))); in testRoundedNumbers()
37 EXPECT_FP_EQ(T(10.0), func(T(10.0))); in testRoundedNumbers()
44 EXPECT_FP_EQ(T(0.0), func(T(0.5))); in testFractions()
45 EXPECT_FP_EQ(T(-1.0), func(T(-0.5))); in testFractions()
46 EXPECT_FP_EQ(T(0.0), func(T(0.115))); in testFractions()
50 EXPECT_FP_EQ(T(1.0), func(T(1.3))); in testFractions()
52 EXPECT_FP_EQ(T(1.0), func(T(1.5))); in testFractions()
54 EXPECT_FP_EQ(T(1.0), func(T(1.75))); in testFractions()
[all …]
H A DRoundTest.h22 typedef T (*RoundFunc)(T);
35 EXPECT_FP_EQ(T(1.0), func(T(1.0))); in testRoundedNumbers()
36 EXPECT_FP_EQ(T(-1.0), func(T(-1.0))); in testRoundedNumbers()
37 EXPECT_FP_EQ(T(10.0), func(T(10.0))); in testRoundedNumbers()
44 EXPECT_FP_EQ(T(1.0), func(T(0.5))); in testFractions()
45 EXPECT_FP_EQ(T(-1.0), func(T(-0.5))); in testFractions()
46 EXPECT_FP_EQ(T(0.0), func(T(0.115))); in testFractions()
50 EXPECT_FP_EQ(T(1.0), func(T(1.3))); in testFractions()
52 EXPECT_FP_EQ(T(2.0), func(T(1.5))); in testFractions()
54 EXPECT_FP_EQ(T(2.0), func(T(1.75))); in testFractions()
[all …]
H A DTruncTest.h22 typedef T (*TruncFunc)(T);
35 EXPECT_FP_EQ(T(1.0), func(T(1.0))); in testRoundedNumbers()
36 EXPECT_FP_EQ(T(-1.0), func(T(-1.0))); in testRoundedNumbers()
37 EXPECT_FP_EQ(T(10.0), func(T(10.0))); in testRoundedNumbers()
44 EXPECT_FP_EQ(T(0.0), func(T(0.5))); in testFractions()
45 EXPECT_FP_EQ(T(-0.0), func(T(-0.5))); in testFractions()
46 EXPECT_FP_EQ(T(0.0), func(T(0.115))); in testFractions()
50 EXPECT_FP_EQ(T(1.0), func(T(1.3))); in testFractions()
52 EXPECT_FP_EQ(T(1.0), func(T(1.5))); in testFractions()
54 EXPECT_FP_EQ(T(1.0), func(T(1.75))); in testFractions()
[all …]
/llvm-project-15.0.7/clang/test/CXX/temp/temp.constr/temp.constr.normal/
H A Dp1.cpp4 template<typename T> concept Foo = True<T*>;
5 template<typename T> concept Bar = Foo<T&>;
6 template<typename T> requires Bar<T> struct S { };
7 template<typename T> requires Bar<T> && true struct S<T> { };
9 template<typename T> concept True2 = sizeof(T) >= 0;
10 template<typename T> concept Foo2 = True2<T*>;
12 template<typename T> concept Bar2 = Foo2<T&>;
14 template<typename T> requires Bar2<T> struct S2 { };
16 template<typename T> requires Bar2<T> && true struct S2<T> { };
47 constexpr void foo() requires C2<T, S1, T> { } in foo()
[all …]

12345678910>>...292