Summary:
This patch does 2 main things:
1. Enable sized delete if the feature test macro `__cpp_sized_deallocation` is enabled.
2. Rework and cleanup all of the sized delete tests.
Test Plan:
The sized delete replacement tests are now split into 4 files:
1. sized_delete11.pass.cpp: Ensure overriding sized delete in C++11 has no effect.
2. sized_delete14.pass.cpp: Test overriding sized delete in C++14 and ensure it is called. This test fails on clang and GCC < 5.1.
3. size_delete_calls_unsized_delete_.pass.cpp: Test that the default sized delete calls unsized delete.
4. sized_delete_fsizeddeallocation.pass.cpp: Test overriding sized delete when -fsized-deallocation is passed. This test should pass on clang and GCC >= 5.1
I have also removed a lot of cruft from the old tests. They no longer replace the new handler and tests that it is called for bad allocations.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D9831
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237662 91177308-0d34-0410-b5e6-96231b3b80d8
Visual Studio's SAL extension uses a macro named __deallocate. This macro is
used pervasively, and gets included through various different ways. This
conflicts with the similarly named interfaces in libc++. Introduce a undef
header similar to __undef_min_max to handle this. This fixes a number of errors
due to the macro replacing the function name.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@229162 91177308-0d34-0410-b5e6-96231b3b80d8
The patch touches these files:
locale
array
deque
new
string
utility
vector
__bit_reference
__split_buffer
locale_win32.h
There is no intended functionality change and it is expected that reversing the position of the inline keyword with regard to the other keywords does not change the meaning of anything, least not for apple/Linux etc.
It is intended to make libcxx more consistent with itself and to prevent the 1000 or so
"inline.cpp(3) : warning C4141: 'inline' : used more than once" warnings that MS's cl.exe compiler emits without this patch, i.e. if inline is not the first keyword before a function name etc.
Prefer "inline [other inline related keyword]" over "[other related keyword] inline".
After this patch, libcxx should be consistent to this pattern.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191987 91177308-0d34-0410-b5e6-96231b3b80d8