| /llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/modernize/ |
| H A D | replace-auto-ptr.cpp | 16 std::auto_ptr<char> f_5(); 57 using std::auto_ptr; 60 using std::auto_ptr; 71 std::auto_ptr<int> a; in f_1() 84 std::auto_ptr<char> d = std::auto_ptr<char>(); in f_1() 119 std::auto_ptr<int> l{std::auto_ptr<int>()}; in f_1() 125 std::auto_ptr<std::auto_ptr<int> > m; in f_1() 161 auto_ptr<int> a; in f_2() 172 auto_ptr<int> a; in f_3() 216 auto_ptr<int> b; in f_8() [all …]
|
| /llvm-project-15.0.7/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-15.0.7/llvm/test/Transforms/MemCpyOpt/ |
| H A D | loadstore-sret.ll | 8 %"class.std::auto_ptr" = type { i32* } 10 define void @_Z3foov(%"class.std::auto_ptr"* noalias nocapture sret(%"class.std::auto_ptr") %agg.re… 13 ; CHECK-NEXT: [[TEMP_LVALUE:%.*]] = alloca %"class.std::auto_ptr", align 8 14 ; CHECK-NEXT: call void @_Z3barv(%"class.std::auto_ptr"* sret(%"class.std::auto_ptr") [[AGG_RESU… 15 …T: [[TMP_I_I:%.*]] = getelementptr inbounds %"class.std::auto_ptr", %"class.std::auto_ptr"* [[T… 16 …: [[TMP_I_I4:%.*]] = getelementptr inbounds %"class.std::auto_ptr", %"class.std::auto_ptr"* [[A… 20 %temp.lvalue = alloca %"class.std::auto_ptr", align 8 21 call void @_Z3barv(%"class.std::auto_ptr"* sret(%"class.std::auto_ptr") %temp.lvalue) 22 …%tmp.i.i = getelementptr inbounds %"class.std::auto_ptr", %"class.std::auto_ptr"* %temp.lvalue, i6… 24 …%tmp.i.i4 = getelementptr inbounds %"class.std::auto_ptr", %"class.std::auto_ptr"* %agg.result, i6… [all …]
|
| /llvm-project-15.0.7/libcxx/include/__memory/ |
| H A D | auto_ptr.h | 30 class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr 37 _LIBCPP_INLINE_VISIBILITY explicit auto_ptr(_Tp* __p = 0) _NOEXCEPT : __ptr_(__p) {} in __ptr_() 38 _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr& __p) _NOEXCEPT : __ptr_(__p.release()) {} in auto_ptr() function 39 template<class _Up> _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr<_Up>& __p) _NOEXCEPT in auto_ptr() function 41 _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr& __p) _NOEXCEPT 43 template<class _Up> _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr<_Up>& __p) _NOEXCEPT 45 _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr_ref<_Tp> __p) _NOEXCEPT 47 _LIBCPP_INLINE_VISIBILITY ~auto_ptr() _NOEXCEPT {delete __ptr_;} in ~auto_ptr() 69 template<class _Up> _LIBCPP_INLINE_VISIBILITY operator auto_ptr<_Up>() _NOEXCEPT 70 {return auto_ptr<_Up>(release());} [all …]
|
| /llvm-project-15.0.7/llvm/test/Transforms/DeadStoreElimination/ |
| H A D | 2011-09-06-EndOfFunction.ll | 6 %"class.std::auto_ptr" = type { i32* } 9 define void @_Z3foov(%"class.std::auto_ptr"* noalias nocapture sret(%"class.std::auto_ptr") %agg.re… 11 %temp.lvalue = alloca %"class.std::auto_ptr", align 8 12 call void @_Z3barv(%"class.std::auto_ptr"* sret(%"class.std::auto_ptr") %temp.lvalue) 13 …%_M_ptr.i.i = getelementptr inbounds %"class.std::auto_ptr", %"class.std::auto_ptr"* %temp.lvalue,… 17 …%_M_ptr.i.i4 = getelementptr inbounds %"class.std::auto_ptr", %"class.std::auto_ptr"* %agg.result,… 23 declare void @_Z3barv(%"class.std::auto_ptr"* sret(%"class.std::auto_ptr"))
|
| /llvm-project-15.0.7/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 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()); 59 -const std::auto_ptr<int> & p = get_ptr(); [all …]
|
| /llvm-project-15.0.7/clang/test/SemaCXX/ |
| H A D | conversion-function.cpp | 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 foo();
|
| /llvm-project-15.0.7/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-15.0.7/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-15.0.7/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/ |
| 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 | 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 | 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 | pointer.pass.cpp | 29 std::auto_ptr<A> ap(p); in test() 35 std::auto_ptr<A> ap; 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 | 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-15.0.7/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-15.0.7/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-15.0.7/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-15.0.7/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-15.0.7/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/ |
| H A D | auto_ptr.depr_in_cxx11.verify.cpp | 30 typedef std::auto_ptr<int> AP; // expected-warning {{'auto_ptr<int>' is deprecated}} in main() 31 typedef std::auto_ptr<void> APV; // expected-warning {{'auto_ptr<void>' is deprecated}} in main()
|
| /llvm-project-15.0.7/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-15.0.7/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()
|