Home
last modified time | relevance | path

Searched refs:Derived (Results 1 – 25 of 449) sorted by relevance

12345678910>>...18

/llvm-project-15.0.7/libcxxabi/test/
H A Dcatch_pointer_reference.pass.cpp151 assert_catches< Derived * , Derived *, Derived>(); in f3()
152 assert_catches<const Derived * , Derived *, Derived>(); in f3()
153 assert_catches< volatile Derived * , Derived *, Derived>(); in f3()
154 assert_catches<const volatile Derived * , Derived *, Derived>(); in f3()
155 assert_catches< Derived * const , Derived *, Derived>(); in f3()
156 assert_catches<const Derived * const , Derived *, Derived>(); in f3()
157 assert_catches< volatile Derived * const , Derived *, Derived>(); in f3()
158 assert_catches<const volatile Derived * const , Derived *, Derived>(); in f3()
159 assert_catches< Derived * volatile, Derived *, Derived>(); in f3()
160 assert_catches<const Derived * volatile, Derived *, Derived>(); in f3()
[all …]
/llvm-project-15.0.7/clang/test/Profile/
H A Dcxx-implicit.cpp33 struct Derived : public Base { struct
34 Derived();
35 Derived(const Derived &);
36 Derived(Derived &&);
37 Derived &operator=(const Derived &);
38 Derived &operator=(Derived &&);
41 Derived::Derived() {} in Derived() function in Derived
42 Derived::Derived(const Derived &d) : Base(d) {} in Derived() function in Derived
43 Derived::Derived(Derived &&d) : Base(static_cast<Base&&>(d)) {} in Derived() function in Derived
44 Derived& Derived::operator=(const Derived &d) { in operator =()
[all …]
/llvm-project-15.0.7/clang/test/CXX/conv/conv.mem/
H A Dp4.cpp11 struct Derived : Base {}; struct
13 int (Derived::*d) = data_ptr; in test()
14 int (Derived::*m)() = method_ptr; in test()
20 struct Derived : private Base {}; // expected-note 2 {{declared private here}} struct
22 …int (Derived::*d) = data_ptr; // expected-error {{cannot cast private base class 'Base' to 'test1:… in test()
23 …int (Derived::*m)() = method_ptr; // expected-error {{cannot cast private base class 'Base' to 'te… in test()
31 struct Derived : A, B {}; struct
40 struct Derived : virtual Base {}; struct
60 struct Derived : Base, virtual A {}; struct
62 int (Derived::*d) = data_ptr; in test()
[all …]
/llvm-project-15.0.7/libcxx/test/std/concepts/concepts.lang/concept.assignable/
H A Dassignable_from.compile.pass.cpp33 struct Derived : Base {}; struct
34 static_assert(!std::assignable_from<Base*, Derived*>);
35 static_assert( std::assignable_from<Base*&, Derived*>);
36 static_assert( std::assignable_from<Base*&, Derived*&>);
37 static_assert( std::assignable_from<Base*&, Derived*&&>);
38 static_assert( std::assignable_from<Base*&, Derived* const>);
39 static_assert( std::assignable_from<Base*&, Derived* const&>);
41 static_assert(!std::assignable_from<Base*&, const Derived*>);
42 static_assert(!std::assignable_from<Base*&, const Derived*&>);
47 static_assert( std::assignable_from<const Base*&, Derived*>);
[all …]
/llvm-project-15.0.7/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/
H A Dp5-var.cpp12 struct Diamond : Derived, Derived2 { };
19 operator Derived&() const;
23 operator Derived&(); // expected-note{{candidate function}}
36 operator Derived() const;
51 void bind_lvalue_to_lvalue(Base b, Derived d, in bind_lvalue_to_lvalue()
58 Derived &dr1 = d; in bind_lvalue_to_lvalue()
99 Derived &ndr1 = ConvertibleToDerivedRef(); in bind_lvalue_to_conv_lvalue()
104 Derived &dr1 = both; in bind_lvalue_to_conv_lvalue_ambig()
120 const Base &br2 = create<Derived>(); in bind_const_lvalue_to_rvalue()
124 const Base &br4 = create<const Derived>(); in bind_const_lvalue_to_rvalue()
[all …]
/llvm-project-15.0.7/clang/include/clang/AST/
H A DRecursiveASTVisitor.h176 Derived &getDerived() { return *static_cast<Derived *>(this); }
520 template <typename Derived>
539 template <typename Derived>
557 template <typename Derived>
569 template <typename Derived>
588 template <typename Derived>
596 template <typename Derived>
614 template <typename Derived>
622 template <typename Derived>
670 template <typename Derived>
[all …]
/llvm-project-15.0.7/clang/test/Analysis/
H A Dbstring.cpp90 class Derived : public Base { class
93 Derived() : d_mem(2) {} in Derived() function in memset_non_pod::Derived
97 Derived d; in memset1_inheritance()
98 memset(&d, 0, sizeof(Derived)); in memset1_inheritance()
105 Derived d; in memset2_inheritance_field()
112 Derived d; in memset3_inheritance_field()
120 Derived array[10]; in memset4_array_nonpod_object()
129 Derived array[10]; in memset5_array_nonpod_object()
138 Derived *array = new Derived[10]; in memset6_new_array_nonpod_object()
148 Derived *d = new Derived(); in memset7_placement_new()
[all …]
H A Dcast-to-struct.cpp22 struct Derived : public Base { struct
23 Derived() : Base(), C(0) {} in Derived() argument
40 Derived D1, *D2; in structToStruct()
42 D2 = (Derived *)&B1; in structToStruct()
43 D2 = dynamic_cast<Derived *>(&B1); in structToStruct()
44 D2 = static_cast<Derived *>(&B1); in structToStruct()
48 …D2 = (Derived *)&B2;// expected-warning {{Casting data to a larger structure type and accessing a … in structToStruct()
50 …D2 = static_cast<Derived *>(&B2);// expected-warning {{Casting data to a larger structure type and… in structToStruct()
55 D2 = (Derived *)B3; in structToStruct()
56 D2 = dynamic_cast<Derived *>(B3); in structToStruct()
[all …]
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dcxx1z-copy-omission.cpp8 struct Derived : Noncopyable {}; struct
40 Noncopyable nc3 = Derived(); // expected-error {{deleted constructor}}
84 Noncopyable &&dc3 = dynamic_cast<Noncopyable&&>(Derived()); in test_expressions()
92 Noncopyable cc2 = (Noncopyable)Derived(); // expected-error {{deleted}} in test_expressions()
95 Noncopyable fc2 = Noncopyable(Derived()); // expected-error {{deleted}} in test_expressions()
133 const Noncopyable &cond8 = b ? cnc : Derived(); // expected-error {{incompatible}} in test_expressions()
146 Noncopyable cf5 = ConversionFunction<Derived>(); // expected-error {{deleted}}
167 struct Foo { template <typename Derived> Foo(const Derived &); };
169 struct Derived : Base<Derived> {}; struct
171 Foo f(Derived d) { return d; } // expected-error {{invokes a deleted function}} in f()
[all …]
/llvm-project-15.0.7/compiler-rt/test/profile/Linux/
H A Dcoverage_ctors.cpp17 struct Derived : public Base { struct
18 Derived(const Derived &) = default; // CHECK: [[@LINE]]| 2| Derived(const Derived &) = default;
19 Derived(Derived &&) = default; // CHECK: [[@LINE]]| 1| Derived(Derived &&) = default;
20 Derived() = default; // CHECK: [[@LINE]]| 1| Derived() = default
23 Derived dd;
25 Derived dd2(dd); in main()
26 Derived dd3(dd2); in main()
27 Derived dd4(static_cast<Derived &&>(dd3)); in main()
/llvm-project-15.0.7/clang/test/CXX/except/except.spec/
H A Dp14.cpp79 struct Derived : ThrowingBase { struct
80 Derived() noexcept(false) = default;
81 Derived(const Derived&) noexcept(false) = default;
82 Derived(Derived&&) noexcept(false) = default;
83 Derived &operator=(const Derived&) noexcept(false) = default;
84 Derived &operator=(Derived&&) noexcept(false) = default;
85 ~Derived() noexcept(false) = default;
87 static_assert(!noexcept(Derived()), "");
88 static_assert(!noexcept(Derived(static_cast<Derived&&>(d1))), "");
121 struct Derived : Base { struct
[all …]
/llvm-project-15.0.7/clang/test/CodeCompletion/
H A Dctor-initializer.cpp18 struct Derived : public Base1 { struct
19 Derived();
20 Derived(int);
21 Derived(float);
25 Derived::Derived() : {} in Derived() argument
32 Derived::Derived(int) try : { in Derived() function in Derived
38 Derived::Derived(float) try : Base1(), in Derived() function in Derived
/llvm-project-15.0.7/clang/lib/Sema/
H A DTreeTransform.h100 template<typename Derived>
106 Derived &Self;
132 Derived &getDerived() { return static_cast<Derived&>(*this); } in getDerived()
3859 template<typename Derived>
3878 template<typename Derived>
3895 template<typename Derived>
3982 template<typename Derived>
4228 template<typename Derived>
4230 TreeTransform<Derived>
4292 template<typename Derived>
[all …]
/llvm-project-15.0.7/clang/test/AST/
H A Ddeduction-guides.cpp47 struct Derived : Base<A> { struct
48 using type_alias = typename Derived::type_alias; argument
49 Derived(Derived &&, typename Derived::type_alias const&);
50 Derived(T);
54 Derived(T, A) -> Derived<T, 1, A>;
57 Derived d {1,2}; in init()
/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/
H A Dpro-type-static-cast-downcast.cpp6 class Derived : public Base { class
28 auto P0 = static_cast<Derived*>(new Base()); in pointers()
32 auto PC0 = static_cast<const Derived*>(B0); in pointers()
35 auto P1 = static_cast<Base*>(new Derived()); // OK, upcast to a public base in pointers()
59 auto A0 = static_cast<Derived*>(ArrayOfBase); in arrays()
72 auto R0 = static_cast<Derived&>(B0); in references()
75 auto R1 = static_cast<Derived&>(RefToBase); in references()
79 auto RC1 = static_cast<const Derived&>(ConstRefToBase); in references()
83 Derived RD1; in references()
113 templ<Derived, Base>(); //FIXME: this should trigger a warning in templ_bad_call()
[all …]
H A Dpro-type-cstyle-cast.cpp29 class Derived : public Base { class
51 auto P0 = (Derived*)new Base(); in pointers()
55 auto PC0 = (const Derived*)(B0); in pointers()
58 auto P1 = (Base*)new Derived(); // OK, upcast to a public base in pointers()
82 auto A0 = (Derived*)ArrayOfBase; in arrays()
95 auto R0 = (Derived&)B0; in references()
98 auto R1 = (Derived&)RefToBase; in references()
102 auto RC1 = (const Derived&)ConstRefToBase; in references()
106 Derived RD1; in references()
136 templ<Derived, Base>(); //FIXME: this should trigger a warning in templ_bad_call()
[all …]
/llvm-project-15.0.7/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/
H A Dp13.cpp24 struct Derived : Base { struct
39 Opaque0 a = Derived().test0((int*) 0); in test0()
40 Opaque1 b = Derived().test0((const int*) 0); in test0()
44 Opaque1 a = Derived().test1((int*) 0); in test1()
45 Opaque0 b = Derived().test1((const int*) 0); in test1()
49 Opaque0 a = ((Derived*) 0)->test2((int*) 0); in test2()
50 Opaque1 b = ((const Derived*) 0)->test2((int*) 0); in test2()
54 Opaque1 a = ((Derived*) 0)->test3((int*) 0); in test3()
55 Opaque0 b = ((const Derived*) 0)->test3((int*) 0); in test3()
/llvm-project-15.0.7/clang/utils/TableGen/
H A DClangSyntaxEmitter.cpp48 if (llvm::Record *Base = Derived->getValueAsOptionalDef("base")) in Hierarchy()
49 link(Derived, Base); in Hierarchy()
64 std::vector<const NodeType *> Derived; member
80 for (const NodeType *D : Start->Derived) in visit()
93 void link(const llvm::Record *Derived, const llvm::Record *Base) { in link() argument
94 auto &CN = get(Derived->getName()), &PN = get(Base->getName()); in link()
96 PN.Derived.push_back(&CN); in link()
105 return N.Derived.empty() ? N : firstConcrete(*N.Derived.front()); in firstConcrete()
108 return N.Derived.empty() ? N : lastConcrete(*N.Derived.back()); in lastConcrete()
152 if (N.Derived.empty()) in EmitClangSyntaxNodeList()
[all …]
/llvm-project-15.0.7/clang/test/CodeGenCXX/
H A Dcall-conv-thru-alias.cpp4 struct Derived : Base { struct
5 virtual ~Derived();
6 static Derived inst; argument
10 Derived::~Derived(){} in ~Derived()
11 Derived Derived::inst;
/llvm-project-15.0.7/clang/test/PCH/
H A Dcxx_exprs.h9 struct Derived : Base { Derived(); void g(); }; struct
11 typedef __typeof__(dynamic_cast<Derived *>(base_ptr)) dynamic_cast_result;
32 void foo(Derived *P) { in foo()
47 Derived foo();
49 Derived::Derived() : Base(4) { in Derived() function
52 void Derived::g() { in g()
64 const Derived &X = foo(); in g()
/llvm-project-15.0.7/llvm/unittests/Support/
H A DCasting.cpp352 class Derived : public Base { class
354 Derived() {} in Derived() function in __anone271e0110211::inferred_upcasting::Derived
360 Derived D; in TEST()
393 struct Derived : Base { struct
394 Derived() : Base(true) {} in Derived() function
451 pointer_wrappers::Derived D;
464 EXPECT_TRUE(!isa<pointer_wrappers::Derived>(MB)); in TEST()
466 EXPECT_TRUE(isa<pointer_wrappers::Derived>(MD)); in TEST()
467 EXPECT_TRUE(isa<pointer_wrappers::Derived>(CD)); in TEST()
506 struct Derived : public Base { struct
[all …]
/llvm-project-15.0.7/clang/test/CodeGenOpenCLCXX/
H A Daddrspace-derived-base.clcpp20 //Derived and Base are in the same address space.
35 class Derived : public B, public B2 {
42 void pr43145(const Derived *argDerived) {
49 Derived *x = (Derived*)argB;
51 // CHECK: bitcast %struct.B addrspace(4)* %0 to %class.Derived addrspace(4)*
57 Derived d;
61 // CHECK: addrspacecast %class.Derived* %d to %class.Derived addrspace(4)*
65 private Derived *pd = &d;
68 // CHECK: addrspacecast %class.Derived* %4 to %class.Derived addrspace(4)*
79 Derived d;
/llvm-project-15.0.7/clang-tools-extra/test/clang-reorder-fields/
H A DFieldDependencyWarningDerived.cpp11 class Derived : public Base { class
13 Derived(long ny);
14 Derived(char nz);
20 Derived::Derived(long ny) : in Derived() function in bar::Derived
27 Derived::Derived(char nz) : in Derived() function in bar::Derived
H A DClassDerived.cpp12 class Derived : public Base { class
14 Derived(long ny);
15 Derived(char nz);
21 Derived::Derived(long ny) : in Derived() function in bar::Derived
27 Derived::Derived(char nz) : in Derived() function in bar::Derived
/llvm-project-15.0.7/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/
H A Dconvert.pass.cpp35 struct Derived : Base {}; struct
39 Derived d; in main()
41 test<cpp17_input_iterator<Base*> >(cpp17_input_iterator<Derived*>(&d)); in main()
42 test<forward_iterator<Base*> >(forward_iterator<Derived*>(&d)); in main()
43 test<bidirectional_iterator<Base*> >(bidirectional_iterator<Derived*>(&d)); in main()
44 test<random_access_iterator<const Base*> >(random_access_iterator<Derived*>(&d)); in main()
49 constexpr const Derived *p = nullptr; in main()
50 constexpr std::move_iterator<const Derived *> it1 = std::make_move_iterator(p); in main()

12345678910>>...18