summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create
Commit message (Collapse)AuthorAgeFilesLines
* Move test into test/std subdirectory.Eric Fiselier2014-12-203-275/+0
| | | | llvm-svn: 224658
* Actually mark the tests an unsupported with MSAN (not just ASAN)Eric Fiselier2014-11-041-1/+1
| | | | llvm-svn: 221240
* Mark tests that replace operator new/delete as UNSUPPORTED with ASAN and MSAN.Eric Fiselier2014-11-041-0/+2
| | | | | | | tests that replace operator new/delete won't link when using ASAN and MSAN because these sanitizers also replace new/delete. llvm-svn: 221236
* Add support for "fancy" pointers to shared_ptr. Fixes PR20616Eric Fiselier2014-10-232-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch add support for "fancy pointers/allocators" as well as fixing support for shared_pointer and "minimal" allocators. Fancy pointers are class types that meet the NullablePointer requirements. In our case they are created by fancy allocators. `support/min_allocator.h` is an archetype for these types. There are three types of changes made in this patch: 1. `_Alloc::template rebind<T>::other` -> `__allocator_traits_rebind<_Alloc, T>::type`. This change was made because allocators don't need a rebind template. `__allocator_traits_rebind` is used instead of `allocator_traits::rebind` because use of `allocator_traits::rebind` requires a workaround for when template aliases are unavailable. 2. `a.deallocate(this, 1)` -> `a.deallocate(pointer_traits<self>::pointer_to(*this), 1)`. This change change is made because fancy pointers aren't always constructible from raw pointers. 3. `p.get()` -> `addressof(*p.get())`. Fancy pointers aren't actually a pointer. When we need a "real" pointer we take the address of dereferencing the fancy pointer. This should give us the actual raw pointer. Test Plan: Tests were added using `support/min_allocator.h` to each affected shared_ptr overload and creation function. These tests can only be executed in C++11 or greater since min_allocator is only available then. A extra test was added for the non-variadic versions of allocate_shared. Reviewers: danalbert, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4859 llvm-svn: 220469
* Found six (nmostly) identical files named 'test_allocator.h' in the libcxx ↵Marshall Clow2013-12-031-1/+1
| | | | | | test suite. Moved one to /support, made it a superset, and removed all but one of the others, and iupdated all the includes. Left the odd one (thread/futures/test_allocator.h) for later. llvm-svn: 196174
* Exercise rvalue arguements to make_shared for C++11 mode.Howard Hinnant2012-02-181-0/+11
| | | | llvm-svn: 150887
* license changeHoward Hinnant2010-11-162-4/+4
| | | | llvm-svn: 119395
* Fixing whitespace problemsHoward Hinnant2010-08-222-2/+123
| | | | llvm-svn: 111767
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-112-2/+2
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-112-0/+2
llvm-svn: 103490
OpenPOWER on IntegriCloud