Marshall Clow
119ed47999
Move bits from N4258. Mark vector's move-constructor unconditionally noexcept in C++1z
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242148 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 14:46:32 +00:00
Marshall Clow
7d914d1bff
Implement the first part of N4258: 'Cleaning up noexcept in the Library'. This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242056 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-13 20:04:56 +00:00
Marshall Clow
0ce05a9f86
The rest of N4279 and LWG#2464 - for unordered_map
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241555 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-07 05:45:35 +00:00
Marshall Clow
f3a1a187a1
Implement N4279 and LWG#2664 for <map>. Reviewed as http://reviews.llvm.org/D10669
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241539 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-07 03:37:33 +00:00
Marshall Clow
58113db00c
Add tests for LWG#2299. While doing so, I noticed that the tests we have for the transparent comparators don't actually call them. Fix those tests, too. Now one of them is failing, due to a missing const in <map>. Add that (twice). Next step is to do the same for <unordered_map>
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241091 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-30 18:15:41 +00:00
Marshall Clow
4356f6392e
Fix PR#23767. Add tests for iterator invalidation for deque::erase/pop_front/pop_back
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@239196 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-05 22:34:19 +00:00
Marshall Clow
c912c0ce7c
While applying N4258, I forgot about LWG#2455, which modified the modifications. Correct those - h/t: Howard
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@239004 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-04 02:05:41 +00:00
Marshall Clow
127db91f3e
More N4258 changes. This time vector's constructors
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238990 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-04 00:10:20 +00:00
Marshall Clow
7242d18811
Fix broken test I just added
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238234 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 19:17:09 +00:00
Marshall Clow
b5b66923e3
Add tests to ensure that string/vector/array have contiguous iterators - which they did. Mark N4284 as complete
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238233 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 18:57:27 +00:00
Marshall Clow
b6d12a2b3a
Fix test that was failing on C++03 b/c it was using initializer lists
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237527 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-16 17:10:49 +00:00
Marshall Clow
488025c316
Fix for LWG Issue 2059: C++0x ambiguity problem with map::erase
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@236950 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-10 13:35:00 +00:00
Marshall Clow
3607f8640d
Remove some debugging printout lines. No functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@236949 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-10 13:26:57 +00:00
Marshall Clow
3accbf03e2
Make the new tests better; make sure that we're testing the case where no reallocation has to happen
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@233641 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 23:26:16 +00:00
Marshall Clow
86319f01df
While testing Erik's code coverage scripts, I found a hole in the test suite - vector::assign where a reallocation was not required had no tests. Add some
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@233557 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 16:07:11 +00:00
Eric Fiselier
8e706d2c3e
[libcxx] Move tuple_size and tuple_element overloads for pair and array out of !defined(_LIBCPP_HAS_NO_VARIADICS) block.
...
Summary:
There is no reason to guard `tuple_size`, `tuple_element` and `get<I>(...)` for pair and array inside of `<__tuple>` so that they are only available when we have variadic templates.
This requires there be redundant declarations and definitions. It also makes it easy to get things wrong.
For example the following code should compile (and does in c++11).
```
#define _LIBCPP_HAS_NO_VARIADICS
#include <array>
int main()
{
static_assert((std::tuple_size<std::array<int, 10> volatile>::value == 10), "");
}
```
This patch lifts the non-variadic parts of `tuple_size`, `tuple_types`, and `get<I>(...)` to the top of `<__tuple>` where they don't require variadic templates. This patch also removes `<__tuple_03>` because there is no longer a need for it.
Reviewers: danalbert, K-ballo, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7774
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232492 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17 15:08:03 +00:00
Eric Fiselier
07a4bec1dd
Use generic feature name for sanitizers that replace new and delete
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231841 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10 20:46:04 +00:00
Eric Fiselier
9f4f2215b7
[libcxx] Fix __RAII_IncreaseAnnotator for increases >= 1
...
Summary: Fix suggested by @mclow.lists on D8109. Store the size of the un-poisoned vector upon construction instead of calculating it later.
Reviewers: titus, mclow.lists, kcc, EricWF
Reviewed By: EricWF
Subscribers: mclow.lists, cfe-commits
Differential Revision: http://reviews.llvm.org/D8172
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231729 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10 00:25:20 +00:00
Eric Fiselier
6e63e2974b
Move test to use correct suffix
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231704 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-09 21:30:48 +00:00
Marshall Clow
d07fcd66b9
Fix an exception-safety bug in <deque>. Reference: PR#22650. Not closing the bug because there's more work to do here
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231672 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-09 17:08:51 +00:00
Marshall Clow
3b1d283788
Move the <dynarray> tests out of the std/ hierarchy, since it's not really part of the standard any more.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231311 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-04 23:09:15 +00:00
Eric Fiselier
9c8e663ced
Allow declaration of map and multimap iterator with incomplete mapped type. Patch from eugenis
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231119 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 20:10:01 +00:00
Eric Fiselier
5495e2efb9
Fix more issues exposed by -pedantic-errors in c++03 mode
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228711 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 17:20:18 +00:00
Eric Fiselier
7f9cc52faf
Remove use of zero length arrays in tests. Get tests passing with -pedantic-errors
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228706 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 16:51:29 +00:00
Marshall Clow
df00d5e5ad
We had two identical files named 'MoveOnly.h' in the test suite. Move one to support/, remove the other, and update all the tests that included them. No functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227370 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 21:22:53 +00:00
Marshall Clow
01c1c6fcc7
Fix PR22366. When move-constructing an associative container and explicitly passing an allocator that compares different, we were not calling the destructor of the elements in the moved-from container.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227359 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 19:54:25 +00:00
Marshall Clow
a1bca66d28
Added test for incomplete type support in vector/list/forward_list. References PR#17980
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227131 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 20:06:52 +00:00
Marshall Clow
3150c3547a
Fix PR#22284. Add a new overload to deque::insert to handle forward iterators. Update tests to exercise this case.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@226847 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22 18:33:29 +00:00
Marshall Clow
6b913d7c52
Walter Brown sent a list of tests which needed 'additional includes' to match what was in the standard. Added these includes to the tests. No changes to the library or test results.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@225541 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-09 20:25:52 +00:00
Marshall Clow
674e07d3c8
libc++ implements its' hash objects as deriving from std::unary_function, and the tests test for that. STL @ MS pointed out that the standard doesn't requie these objects to derive from unary_function, and so the tests should not require that either. Change the tests to check for the embedded typedefs - which ARE required. No change to the library.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@225403 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07 21:53:23 +00:00
Eric Fiselier
a90c6dd460
Move test into test/std subdirectory.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224658 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-20 01:40:03 +00:00