Stephan Tolksdorf
e180ecab2c
[libc++] Teach is_integral, is_[un]signed and make_[un]signed about __[u]int128_t
...
This commit also adds tests for std::numeric_limits<__[u]int128_t>.
Reviewed in http://llvm-reviews.chandlerc.com/D2917
llvm-svn: 204849
2014-03-26 19:45:52 +00:00
Marshall Clow
28c391f68e
Add tests that should fail when lock() throws. THis is part of LWG issue #2135 . No library changes here.
...
llvm-svn: 204777
2014-03-26 02:11:47 +00:00
Marshall Clow
4fdb070817
Add a test to make sure we're doing the right thing for throwing exceptions from deferred functions. This is LWG issue #2186 . No change to the library needed.
...
llvm-svn: 204678
2014-03-24 22:25:24 +00:00
David Majnemer
7ec93f9b1c
Implement N3891: A proposal to rename shared_mutex to shared_timed_mutex
...
This is as straightforward as it sounds, a renamed from shared_mutex to
shared_timed_mutex.
Note that libcxx .dylib and .so files built with c++14 support need to
be rebuilt.
llvm-svn: 204078
2014-03-17 20:19:44 +00:00
Marshall Clow
ef3d680093
Implement LWG 2360: 'reverse_iterator::operator*() is unimplementable'. Note that this is a (small) behavior change in the library. Reverse iterators whose base iterators' operator* return references to 'within themselves' have been sacrificed to the greater goal of avoiding data races.
...
llvm-svn: 203587
2014-03-11 17:16:17 +00:00
Marshall Clow
b708306128
Patch from Steve MacKenzie to make the libc++ tests play nicely with MSVC's STL. Add '#include <functional>' to four of the priority queue tests.
...
llvm-svn: 203584
2014-03-11 16:22:53 +00:00
Marshall Clow
b33d838bcf
Final bit for LWG #2263 ; test different allocator pointer types. Note that libc++ already does the right thing here; I've just added tests to ensure that it stays this way.
...
llvm-svn: 203539
2014-03-11 04:32:12 +00:00
Marshall Clow
17af2f56ab
Add tests for LWG issue #2356 . Stability of erasure in unordered associative containers. Libc++ already does this, but now we have tests for it.
...
llvm-svn: 203494
2014-03-10 21:36:36 +00:00
Marshall Clow
988a4e8d0e
More tests for LWG Issue #2263 ; this time to the associative and unordered containers. Still no changes to libc++
...
llvm-svn: 203480
2014-03-10 19:18:49 +00:00
Marshall Clow
9f60718286
Added tests to the sequence containers for for LWG Issue #2263 . Comparing iterators and allocator pointers with different const-character. No changes to libc++
...
llvm-svn: 203479
2014-03-10 18:54:56 +00:00
Marshall Clow
b162b17f05
Implement LWG #2344 : quoted()'s interaction with padding is unclear. I think that anyone using quoted with padding is really confused, but it should work the way the rest of iostreams works.
...
llvm-svn: 203290
2014-03-07 21:45:32 +00:00
Marshall Clow
66b2226eb8
Fix a couple of -Wabsolute-value warnings in the libc++ tests
...
llvm-svn: 203126
2014-03-06 16:27:17 +00:00
Peter Collingbourne
8845dbd798
Do not derive __gnu_cxx::hash<T> from std::hash<T>.
...
Instead, define explicit specializations for the basic types listed in
the SGI documentation. This solves two problems:
1) Helps avoid silent ODR violations caused by the absence of a
user-supplied __gnu_cxx::hash specialization in cases where a std::hash
specialization exists (e.g. for std::string).
2) __gnu_cxx::hash semantics are slightly different to those of
std::hash (for example, the former may dereference a pointer argument)
so it is inappropriate for __gnu_cxx::hash to receive std::hash
specializations by default.
Differential Revision: http://llvm-reviews.chandlerc.com/D2747
llvm-svn: 203070
2014-03-06 04:11:10 +00:00
Marshall Clow
78a87e8a68
Implement LWG 2193. Default constructors for standard library containers are explicit. Note that libc++ already did this for string/deque/forward_list/list/vector and the unordered containers; implement it for set/multiset/map/multimap. Add tests for all the containers. Two drive-by fixes as well: add a missing explicit in <deque>, and remove a tab that snuck into a container test. This issue is also LLVM bug 15724, and resolves it.
...
llvm-svn: 202994
2014-03-05 19:06:20 +00:00
Marshall Clow
28eded3845
Mark is_final as a C++14 feature.
...
llvm-svn: 202991
2014-03-05 17:58:48 +00:00
Marshall Clow
f2c10e1340
Remove definition of std::fmaf from libc++. Fixes bug #18910 . This function should come from the C standard library. As a drive-by fix, update the tests to remove a warning from -Wabsolute-value
...
llvm-svn: 202990
2014-03-05 17:09:51 +00:00
Marshall Clow
39bca1ea99
Implement LWG #2212 : std::is_final. This requires compiler support, which modern versions of clang provide. Also mark LWG #2230 as complete - no code changes needed.
...
llvm-svn: 202934
2014-03-05 03:39:25 +00:00
Marshall Clow
4703f76376
Update synposis in <memory> to show move semantics for weak_ptr; add tests for already existing move semantics. Mark LWG issues #2315 (no changes needed), 2316 (move semantics for weak_ptr), 2252 (previous commit) and 2271 (previous commit) as complete.
...
llvm-svn: 202931
2014-03-05 03:12:04 +00:00
Marshall Clow
7f10fc480a
LWG Issue #2271 : regex_traits::lookup_classname specification unclear. libc++ already does the right thing; just update the tests.
...
llvm-svn: 202904
2014-03-04 22:44:34 +00:00
Marshall Clow
d9e7cf3efd
LWG issue #2252 : Add more tests for exception safety. No changes needed in the library
...
llvm-svn: 202885
2014-03-04 20:31:21 +00:00
Marshall Clow
53b88dad6f
Implement LWG #2268 : Setting a default argument in the declaration of a member function assign of std::basic_string.
...
llvm-svn: 202876
2014-03-04 19:17:19 +00:00
Peter Collingbourne
99aadbdb7d
[libc++] Const qualify __gnu_cxx::hash_map<>::const_iterator::pointer type.
...
Differential Revision: http://llvm-reviews.chandlerc.com/D2811
llvm-svn: 202749
2014-03-03 19:50:01 +00:00
Marshall Clow
f519be343b
Implement LWG 2324: Insert iterator constructors should use addressof(). Add two new container classes to the test suite that overload operator &, and add test cases to the insert/front_insert/back_insert iterator tests that use these containers.
...
llvm-svn: 202741
2014-03-03 19:20:40 +00:00
Marshall Clow
c451b43607
Remove a stray tab that snuck into a test. No functionality change
...
llvm-svn: 202739
2014-03-03 19:16:40 +00:00
Marshall Clow
05c8dad230
Implement LWG Paper n3887: Consistent Metafunction Aliases. This adds std::tuple_element_t<> as an alias for tuple_element<>::type. Clean up the synopsis for tuple_element in <utility> as well.
...
llvm-svn: 202673
2014-03-03 06:18:11 +00:00
Marshall Clow
6a640a18a4
Implement LWG Issue #2285 - make_reverse_iterator. Also mark issues #1450 and #2205 as complete; they are just wording changes in the standard. Mark issues #2359 , #2320 and #2322 as complete - libc++ implements them already.
...
llvm-svn: 202671
2014-03-03 01:24:04 +00:00
Marshall Clow
4ab4534964
More LWG issues. Mark #2182 , #2323 and #2213 as complete. Add a test for #2339 , and mark that as complete. No actual changes to the libc++ code; all of these were already in place.
...
llvm-svn: 202407
2014-02-27 16:13:36 +00:00
Marshall Clow
c204c130fa
LWG issue #2188 : Reverse iterator does not fully support targets that overload operator&. Also mark #2272 and #2299 as complete; libc++ already implements them.
...
llvm-svn: 202339
2014-02-27 02:11:50 +00:00
Marshall Clow
16da324051
Implement LWG issue 2306: match_results::reference should be value_type&, not const value_type&. This is a general move by the LWG to have the reference type of read-only containers be a non-const reference; however, there are no methods that return a non-const reference to a match_result entry, so there's no worries about getting a non-const reference to a constant object.
...
llvm-svn: 202214
2014-02-26 01:56:31 +00:00
Marshall Clow
0d1560e10e
Implement LWG issue 2301: Mark std::tie as constexpr
...
llvm-svn: 202158
2014-02-25 16:11:46 +00:00
Marshall Clow
7d35711187
Implement LWG Issues #2329 and #2332 - disallow iterators into temporary regexes and regexes into temporary strings
...
llvm-svn: 201717
2014-02-19 21:21:11 +00:00
Marshall Clow
6c3f5ffbb8
Implement LWG Issue: 2280. begin/end for arrays should be constexpr and noexcept, plus a drive-by fix for cbegin/cend suggested by Peter Sommerlad.
...
llvm-svn: 201703
2014-02-19 17:53:30 +00:00
Marshall Clow
9d67c6d5fd
Implement LWG2350: min, max, and minmax should be constexpr.
...
llvm-svn: 201697
2014-02-19 16:51:35 +00:00
Marshall Clow
cdf2fae610
Add a test to make sure that vector supports incomplete types
...
llvm-svn: 201349
2014-02-13 17:56:12 +00:00
Marshall Clow
5bd869490b
Fix for PR17606 - result_of (and INVOKE) works incorrectly for member function pointers with ref qualifiers. Also a drive-by fix for common_type in C++03 mode. Thanks to Michel Morin for the bug report and the proposed fix.
...
llvm-svn: 201101
2014-02-10 17:40:28 +00:00
Marshall Clow
74cf6ff5e5
Fix for PR18735 - self-assignment for map/multimap gives incorrect results in C++03
...
llvm-svn: 201021
2014-02-08 04:03:14 +00:00
Peter Collingbourne
09df4a6675
Support forward_list<Incomplete Type>. Patch by Zhihao Yuan!
...
llvm-svn: 200814
2014-02-05 01:44:17 +00:00
Howard Hinnant
7fe6441cc3
Albert Wong: Fix thread.thread.id/lt.pass.cpp to not assume thread::id() produces a minimal value. This enables this test to pass on andriod arm.
...
llvm-svn: 200793
2014-02-04 19:51:48 +00:00
Marshall Clow
0c8bb8f0f2
Fix numeric.limits.members/traps.pass.cpp to pass on non-x86 architectures. Fixes bug #18468
...
llvm-svn: 200724
2014-02-03 23:26:56 +00:00
David Fang
7584238232
lit.site.cfg:cxx_under_test should take precedence over 'which clang++'
...
(reviewed by Marshall Clow)
llvm-svn: 200364
2014-01-29 01:54:52 +00:00
Marshall Clow
30f1883eee
Removed extra line that I left in when committing 199694. Thanks to Jared Grubb for the catch.
...
llvm-svn: 200108
2014-01-26 01:59:59 +00:00
Peter Collingbourne
a5adf489b7
Const qualify __mem_fn call operator
...
QOI improvement.
Differential Revision: http://llvm-reviews.chandlerc.com/D2059
llvm-svn: 199848
2014-01-22 22:56:52 +00:00
Marshall Clow
d724d60fff
Removed extra space; thanks to thakis_'s eagle eye
...
llvm-svn: 199695
2014-01-21 00:03:44 +00:00
Marshall Clow
683268b2d8
Fixed test failure in is_iec559.pass.cpp on darwin-ppc32. Thanks to David Fang for the report (and suggested fix)
...
llvm-svn: 199694
2014-01-20 23:57:16 +00:00
Marshall Clow
7132122196
Fix erroneous test; was failing on darwin-ppc32. Fixes PR18469.
...
llvm-svn: 199542
2014-01-18 03:41:54 +00:00
Marshall Clow
354d39cabc
Add license headers to a bunch of libc++ files that were missing them. No functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch.
...
llvm-svn: 199400
2014-01-16 16:58:45 +00:00
Marshall Clow
9f4be3fa4f
Apply patch for Albert Wong: 'Modify testit to allow filtering tests by prefixes'.
...
llvm-svn: 199318
2014-01-15 16:28:42 +00:00
Marshall Clow
b183f8594f
Whoops! Set the default in the last commit to c++1y instead of c++11
...
llvm-svn: 199224
2014-01-14 17:04:06 +00:00
Marshall Clow
4cdc6feb4f
Update lib/buildit and test/testit to both pay attention to an env flag CXX_LANG, which people can set to 'c++03', 'c++11' or 'c++1y' to build/test using that language variant. If you don't set this env variable, you get c++11, just like today. Drive-by fix; remove duplicate -nostdinc++.
...
llvm-svn: 199222
2014-01-14 17:00:40 +00:00
Marshall Clow
79b0fee3c6
Fix PR18404 - 'Bug in regex_token_iterator::operator++(int) implementation'. Enhance the tests for regex_token_iterator and regex_iterator.
...
llvm-svn: 198878
2014-01-09 18:25:57 +00:00