/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/ |
H A D | replace-auto-ptr.cpp | 10 std::auto_ptr<Derived> create_derived_ptr(); 16 std::auto_ptr<char> f_5(); 22 void f_6(std::auto_ptr<int>); 25 void f_7(const std::auto_ptr<int> &); 32 std::auto_ptr<int> field; 36 typedef std::auto_ptr<int> int_ptr_type; 44 typedef typename std::auto_ptr<T> created_type; 48 created_type create() { return std::auto_ptr<T>(new T()); } in create() 57 using std::auto_ptr; 60 using std::auto_ptr; [all …]
|
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/replace-auto-ptr/ |
H A D | memory.h | 12 template <class X> class auto_ptr { 15 explicit auto_ptr(X *p = 0) throw() {} in throw() 16 auto_ptr(auto_ptr &) throw() {} in throw() 17 template <class Y> auto_ptr(auto_ptr<Y> &) throw() {} in auto_ptr() function 18 auto_ptr &operator=(auto_ptr &) throw() { return *this; } in throw() 19 template <class Y> auto_ptr &operator=(auto_ptr<Y> &) throw() { in throw() 22 auto_ptr &operator=(auto_ptr_ref<X> r) throw() { return *this; } in throw() 23 ~auto_ptr() throw() {} in throw() 24 auto_ptr(auto_ptr_ref<X> r) throw() : x_(r.y_) {} in throw() 30 template <class Y> operator auto_ptr<Y>() throw() { return auto_ptr<Y>(x_); } in throw() [all …]
|
/llvm-project/libcxx/include/__memory/ |
H A D | auto_ptr.h | 29 class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr { 36 _LIBCPP_HIDE_FROM_ABI explicit auto_ptr(_Tp* __p = 0) _NOEXCEPT : __ptr_(__p) {} in __ptr_() 37 _LIBCPP_HIDE_FROM_ABI auto_ptr(auto_ptr& __p) _NOEXCEPT : __ptr_(__p.release()) {} in auto_ptr() function 39 _LIBCPP_HIDE_FROM_ABI auto_ptr(auto_ptr<_Up>& __p) _NOEXCEPT : __ptr_(__p.release()) {} in auto_ptr() function 40 _LIBCPP_HIDE_FROM_ABI auto_ptr& operator=(auto_ptr& __p) _NOEXCEPT { 45 _LIBCPP_HIDE_FROM_ABI auto_ptr& operator=(auto_ptr<_Up>& __p) _NOEXCEPT { 49 _LIBCPP_HIDE_FROM_ABI auto_ptr& operator=(auto_ptr_ref<_Tp> __p) _NOEXCEPT { 53 _LIBCPP_HIDE_FROM_ABI ~auto_ptr() _NOEXCEPT { delete __ptr_; } in ~auto_ptr() 69 _LIBCPP_HIDE_FROM_ABI auto_ptr(auto_ptr_ref<_Tp> __p) _NOEXCEPT : __ptr_(__p.__ptr_) {} in auto_ptr() function 77 _LIBCPP_HIDE_FROM_ABI operator auto_ptr<_Up>() _NOEXCEPT { [all …]
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/modernize/ |
H A D | replace-auto-ptr.rst | 6 This check replaces the uses of the deprecated class ``std::auto_ptr`` by 15 -void take_ownership_fn(std::auto_ptr<int> int_ptr); 19 - std::auto_ptr<int> a(new int(x)); 20 - std::auto_ptr<int> b; 40 * Client code that declares a reference to an ``std::auto_ptr`` coming from 45 ``std::unique_ptr`` from an ``std::auto_ptr``. This pattern doesn't make much 46 sense and usually ``std::auto_ptr`` are stored by value (otherwise what is 52 std::auto_ptr<int> get_value(); 53 const std::auto_ptr<int> & get_ref(); 56 -std::auto_ptr<int> a(get_value()); [all …]
|
/llvm-project/llvm/test/Transforms/MemCpyOpt/ |
H A D | loadstore-sret.ll | 8 %"class.std::auto_ptr" = type { ptr } 10 define void @_Z3foov(ptr noalias nocapture writable sret(%"class.std::auto_ptr") %agg.result) ssp { 13 ; CHECK-NEXT: [[TEMP_LVALUE:%.*]] = alloca %"class.std::auto_ptr", align 8 14 ; CHECK-NEXT: call void @_Z3barv(ptr sret(%"class.std::auto_ptr") [[AGG_RESULT:%.*]]) 18 %temp.lvalue = alloca %"class.std::auto_ptr", align 8 19 call void @_Z3barv(ptr sret(%"class.std::auto_ptr") %temp.lvalue) 25 declare void @_Z3barv(ptr nocapture sret(%"class.std::auto_ptr")) nounwind
|
/llvm-project/clang/test/SemaCXX/ |
H A D | conversion-function.cpp | 264 // auto_ptr-like template. In particular, we can't create multiple 266 struct auto_ptr { struct 269 auto_ptr(auto_ptr&); 270 auto_ptr(auto_ptr_ref); 271 explicit auto_ptr(int *); 277 X(auto_ptr); 281 X x(auto_ptr(new int)); in f() 282 return X(auto_ptr(new int)); in f() 285 auto_ptr fo 267 auto_ptr_refPR7055::auto_ptr global() argument [all...] |
/llvm-project/llvm/test/Transforms/DeadStoreElimination/ |
H A D | 2011-09-06-EndOfFunction.ll | 6 %"class.std::auto_ptr" = type { ptr } 9 define void @_Z3foov(ptr noalias nocapture sret(%"class.std::auto_ptr") %agg.result) uwtable ssp { 11 %temp.lvalue = alloca %"class.std::auto_ptr", align 8 12 call void @_Z3barv(ptr sret(%"class.std::auto_ptr") %temp.lvalue) 21 declare void @_Z3barv(ptr sret(%"class.std::auto_ptr"))
|
/llvm-project/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/ |
H A D | auto_pointer.pass.cpp | 53 using AP = std::auto_ptr<int>; in test_sfinae() 59 using AP = std::auto_ptr<A>; in test_sfinae() 68 std::auto_ptr<B> ap(p); in main() 79 std::auto_ptr<B> ap(p); in main() 92 std::auto_ptr<B>&&>::value, in main()
|
/llvm-project/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/ |
H A D | convert_to_auto_ptr.pass.cpp | 24 std::auto_ptr<B> 27 return std::auto_ptr<B>(new B(1)); in source() 33 std::auto_ptr<A> ap2(source()); in test()
|
H A D | convert_to_auto_ptr_ref.pass.cpp | 28 std::auto_ptr<B> ap1(p1); in test() 30 std::auto_ptr<A> ap2(apr); in test()
|
/llvm-project/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/ |
H A D | assignment.compile.fail.cpp | 25 const std::auto_ptr<A> ap1(p1); in test() 27 std::auto_ptr<A> ap2(p2); in test() 31 std::auto_ptr<A>& apr = ap2 = ap1; in test()
|
H A D | assignment.pass.cpp | 29 std::auto_ptr<A> ap1(p1); in test() 31 std::auto_ptr<A> ap2(p2); in test() 35 std::auto_ptr<A>& apr = ap2 = ap1; in test()
|
H A D | convert_assignment.pass.cpp | 29 std::auto_ptr<B> ap1(p1); in test() 31 std::auto_ptr<A> ap2(p2); in test() 36 std::auto_ptr<A>& apr = ap2 = ap1; in test()
|
H A D | convert_assignment.compile.fail.cpp | 27 const std::auto_ptr<B> ap1(p1); in test() 29 std::auto_ptr<A> ap2(p2); in test() 34 std::auto_ptr<A>& apr = ap2 = ap1; in test()
|
H A D | explicit.compile.fail.cpp | 27 std::auto_ptr<A> ap = p; in test() 33 std::auto_ptr<A> ap; in test()
|
H A D | pointer.pass.cpp | 29 std::auto_ptr<A> ap(p); in test() 35 std::auto_ptr<A> ap; in test()
|
H A D | copy.pass.cpp | 29 std::auto_ptr<A> ap1(p); in test() 30 std::auto_ptr<A> ap2(ap1); in test()
|
H A D | copy.compile.fail.cpp | 27 const std::auto_ptr<A> ap1(p); in test() 28 std::auto_ptr<A> ap2(ap1); in test()
|
/llvm-project/clang/test/CodeGenCXX/ |
H A D | 2010-07-23-DeclLoc.cpp | 14 template<typename _Tp> class auto_ptr { class 18 auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } in auto_ptr() function in std::auto_ptr 78 std::auto_ptr< TRawSymbolOwnerData<SIZE> > data(new TRawSymbolOwnerData<SIZE>()); in create_symbol_owner_data_arch_specific() 79 std::auto_ptr< TExtendedMachOHeader<SIZE_AND_ENDIANNESS> > header; in create_symbol_owner_data_arch_specific()
|
/llvm-project/clang/test/Analysis/diagnostics/Inputs/include/ |
H A D | report-issues-within-main-file.h | 2 class auto_ptr { 6 auto_ptr(_Tp* __p = 0) throw() : _M_ptr(__p) { } in throw() 7 ~auto_ptr() { delete _M_ptr; } in ~auto_ptr()
|
/llvm-project/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/ |
H A D | reset.pass.cpp | 29 std::auto_ptr<A> ap(p); in test() 37 std::auto_ptr<A> ap(p); in test() 45 std::auto_ptr<A> ap(p); in test()
|
/llvm-project/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/ |
H A D | auto_ptr_Y.pass.cpp | 50 std::auto_ptr<A> pA(new A); in main() 67 std::auto_ptr<A> pA; in main() 84 std::auto_ptr<A> pA(new A); in main() 101 std::auto_ptr<A> pA; in main()
|
/llvm-project/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/ |
H A D | auto_ptr.pass.cpp | 51 std::auto_ptr<A> ptr(new A); in main() 65 std::auto_ptr<A const> ptr(new A); in main() 79 std::auto_ptr<A> ptr(new A); in main()
|
/llvm-project/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/ |
H A D | auto_ptr.depr_in_cxx11.verify.cpp | 28 typedef std::auto_ptr<int> AP; // expected-warning {{'auto_ptr<int>' is deprecated}} 29 typedef std::auto_ptr<void> APV; // expected-warning {{'auto_ptr<void>' is deprecated}}
|
/llvm-project/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/ |
H A D | element_type.pass.cpp | 31 static_assert((std::is_same<typename std::auto_ptr<T>::element_type, T>::value), ""); in test() 32 std::auto_ptr<T> p; in test()
|