| /llvm-project-15.0.7/libcxxabi/test/ |
| H A D | catch_pointer_reference.pass.cpp | 151 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 D | cxx-implicit.cpp | 33 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 D | p4.cpp | 11 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 D | assignable_from.compile.pass.cpp | 33 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 D | p5-var.cpp | 12 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 D | RecursiveASTVisitor.h | 176 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 D | bstring.cpp | 90 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 D | cast-to-struct.cpp | 22 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 D | cxx1z-copy-omission.cpp | 8 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 D | coverage_ctors.cpp | 17 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 D | p14.cpp | 79 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 D | ctor-initializer.cpp | 18 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 D | TreeTransform.h | 100 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 D | deduction-guides.cpp | 47 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 D | pro-type-static-cast-downcast.cpp | 6 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 D | pro-type-cstyle-cast.cpp | 29 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 D | p13.cpp | 24 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 D | ClangSyntaxEmitter.cpp | 48 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 D | call-conv-thru-alias.cpp | 4 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 D | cxx_exprs.h | 9 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 D | Casting.cpp | 352 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 D | addrspace-derived-base.clcpp | 20 //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 D | FieldDependencyWarningDerived.cpp | 11 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 D | ClassDerived.cpp | 12 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 D | convert.pass.cpp | 35 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()
|