Home
last modified time | relevance | path

Searched refs:auto_ptr (Results 1 – 25 of 49) sorted by relevance

12

/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/
H A Dreplace-auto-ptr.cpp10 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 Dmemory.h12 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 Dauto_ptr.h29 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 Dreplace-auto-ptr.rst6 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 Dloadstore-sret.ll8 %"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 Dconversion-function.cpp264 // 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 D2011-09-06-EndOfFunction.ll6 %"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 Dauto_pointer.pass.cpp53 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 Dconvert_to_auto_ptr.pass.cpp24 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 Dconvert_to_auto_ptr_ref.pass.cpp28 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 Dassignment.compile.fail.cpp25 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 Dassignment.pass.cpp29 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 Dconvert_assignment.pass.cpp29 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 Dconvert_assignment.compile.fail.cpp27 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 Dexplicit.compile.fail.cpp27 std::auto_ptr<A> ap = p; in test()
33 std::auto_ptr<A> ap; in test()
H A Dpointer.pass.cpp29 std::auto_ptr<A> ap(p); in test()
35 std::auto_ptr<A> ap; in test()
H A Dcopy.pass.cpp29 std::auto_ptr<A> ap1(p); in test()
30 std::auto_ptr<A> ap2(ap1); in test()
H A Dcopy.compile.fail.cpp27 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 D2010-07-23-DeclLoc.cpp14 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 Dreport-issues-within-main-file.h2 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 Dreset.pass.cpp29 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 Dauto_ptr_Y.pass.cpp50 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 Dauto_ptr.pass.cpp51 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 Dauto_ptr.depr_in_cxx11.verify.cpp28 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 Delement_type.pass.cpp31 static_assert((std::is_same<typename std::auto_ptr<T>::element_type, T>::value), ""); in test()
32 std::auto_ptr<T> p; in test()

12