Commit Graph

569 Commits

Author SHA1 Message Date
Marshall Clow
cbb9305c26 LWG issue #2252: Add more tests for exception safety. No changes needed in the library
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202885 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 20:31:21 +00:00
Marshall Clow
a93b5e27a8 Implement LWG #2268: Setting a default argument in the declaration of a member function assign of std::basic_string.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202876 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 19:17:19 +00:00
Peter Collingbourne
be8a99ad0f [libc++] Const qualify __gnu_cxx::hash_map<>::const_iterator::pointer type.
Differential Revision: http://llvm-reviews.chandlerc.com/D2811

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202749 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 19:50:01 +00:00
Marshall Clow
53c0e72d5c 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202741 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 19:20:40 +00:00
Marshall Clow
0c60b0a686 Remove a stray tab that snuck into a test. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202739 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 19:16:40 +00:00
Marshall Clow
50fe0c7d61 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202673 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 06:18:11 +00:00
Marshall Clow
ff137e9145 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202671 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 01:24:04 +00:00
Marshall Clow
37a9ca6fb2 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202407 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27 16:13:36 +00:00
Marshall Clow
02ca8af10b LWG issue #2188: Reverse iterator does not fully support targets that overload operator&. Also mark #2272 and #2299 as complete; libc++ already implements them.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202339 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27 02:11:50 +00:00
Marshall Clow
103af3478e 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202214 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26 01:56:31 +00:00
Marshall Clow
8e554d93da Implement LWG issue 2301: Mark std::tie as constexpr
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202158 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25 16:11:46 +00:00
Marshall Clow
e0f8672e7a Implement LWG Issues #2329 and #2332 - disallow iterators into temporary regexes and regexes into temporary strings
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201717 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 21:21:11 +00:00
Marshall Clow
9dacb2f713 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201703 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 17:53:30 +00:00
Marshall Clow
9d9463a355 Implement LWG2350: min, max, and minmax should be constexpr.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201697 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 16:51:35 +00:00
Marshall Clow
d2060f06b5 Add a test to make sure that vector supports incomplete types
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201349 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-13 17:56:12 +00:00
Marshall Clow
71e699dda5 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201101 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 17:40:28 +00:00
Marshall Clow
ebfc50ee89 Fix for PR18735 - self-assignment for map/multimap gives incorrect results in C++03
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201021 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-08 04:03:14 +00:00
Peter Collingbourne
a3dc8f3b8b Support forward_list<Incomplete Type>. Patch by Zhihao Yuan!
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@200814 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 01:44:17 +00:00
Howard Hinnant
08356fbee7 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@200793 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 19:51:48 +00:00
Marshall Clow
13fbe9d5e3 Fix numeric.limits.members/traps.pass.cpp to pass on non-x86 architectures. Fixes bug #18468
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@200724 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-03 23:26:56 +00:00
David Fang
a612c62740 lit.site.cfg:cxx_under_test should take precedence over 'which clang++'
(reviewed by Marshall Clow)

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@200364 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-29 01:54:52 +00:00
Marshall Clow
28754d0378 Removed extra line that I left in when committing 199694. Thanks to Jared Grubb for the catch.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@200108 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 01:59:59 +00:00
Peter Collingbourne
a4c0d87a84 Const qualify __mem_fn call operator
QOI improvement.

Differential Revision: http://llvm-reviews.chandlerc.com/D2059

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199848 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-22 22:56:52 +00:00
Marshall Clow
15066f21f1 Removed extra space; thanks to thakis_'s eagle eye
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199695 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-21 00:03:44 +00:00
Marshall Clow
1a383b9755 Fixed test failure in is_iec559.pass.cpp on darwin-ppc32. Thanks to David Fang for the report (and suggested fix)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199694 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-20 23:57:16 +00:00
Marshall Clow
e3c9d52d6d Fix erroneous test; was failing on darwin-ppc32. Fixes PR18469.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199542 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-18 03:41:54 +00:00
Marshall Clow
98760c18f8 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199400 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-16 16:58:45 +00:00
Marshall Clow
beee5e48b3 Apply patch for Albert Wong: 'Modify testit to allow filtering tests by prefixes'.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199318 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 16:28:42 +00:00
Marshall Clow
928bb68bb2 Whoops! Set the default in the last commit to c++1y instead of c++11
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199224 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 17:04:06 +00:00
Marshall Clow
2f78c0d9f9 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++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199222 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 17:00:40 +00:00
Marshall Clow
0efd9dcfa0 Fix PR18404 - 'Bug in regex_token_iterator::operator++(int) implementation'. Enhance the tests for regex_token_iterator and regex_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@198878 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-09 18:25:57 +00:00
Marshall Clow
908b5d7f92 Back out the <type_traits> changes from r198431; they were breaking when building with glibc. Need to find a better solution for PR18218.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@198623 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-06 18:12:50 +00:00
Marshall Clow
854a7a02b4 Patch by Howard. First part of fix for PR18218; add type traits needed to do the right thing. Fix the problems in PR18218 for isnan and pow - they also need to be applied to the other functions in <cmath>. Also, a drive-by fix for the test - now actually calls test_abs()
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@198431 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-03 18:21:14 +00:00
Marshall Clow
239bc42b53 Make cv_status a class enum. Fixes PR18314. Thanks to Andersca for the report and the patch.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@197921 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-23 22:14:27 +00:00
Marshall Clow
1b92188a82 Found six (nmostly) identical files named 'test_allocator.h' in the libcxx 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@196174 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-03 00:18:10 +00:00
Marshall Clow
ebedffde9a Found two identical files named 'allocators.h' in the libcxx test suite. Moved one to /support, removed the other, and iupdated all the includes. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@196127 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-02 18:08:31 +00:00
Marshall Clow
e27dbcf2dc Found two identical files named 'DefaultOnly.h' in the libcxx test suite. Moved one to /support, removed the other, and iupdated all the includes. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@196118 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-02 17:00:56 +00:00
Marshall Clow
6daf534441 Fix for PRPR17934; based on a fix suggested by Peter Sommerlad
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@196058 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-02 03:24:33 +00:00
Sylvestre Ledru
a7d46056b0 Remove executable permissions on a text file
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@196041 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-01 10:15:11 +00:00
Marshall Clow
061d0cc4db There were two identical files named 'min_allocator.h'. Move one of them to /support and delete the other. Then adjust all the tests that used them to include the moved one. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@195785 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-26 20:58:02 +00:00
Marshall Clow
16c76a2107 Fix a test that I broke over the weekend
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@195143 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 19:14:27 +00:00
Marshall Clow
0cdbe60481 Move <optional> into include/experimental, and into the std::experimental namespace, since it's not part of C++14, but of an upcoming TS
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@194867 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15 22:42:10 +00:00
Marshall Clow
0c6a583e2a Fixed bug in quoted strings implementation. Added test to be sure. Thanks to Peter Sommerlad for the report (and suggested fix)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@194725 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-14 20:01:38 +00:00
Marshall Clow
6b7c2aeb00 Move <dynarray> into include/experimental, and into the std::experimental namespace, since it's not part of C++14, but of an upcoming TS
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@194614 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-13 22:44:48 +00:00
Howard Hinnant
3f81e9eeba This fixes a very subtle ABI problem concerning the copy constructor of
pair, and a couple of pair-like implementation detail types.  The
C++98/03 and 11 standards all specify that the copy constructor of
pair<int, int> is trivial. However as libc++ tracked the draft C++11
standard over the years, this copy constructor became non-trivial, and
then just recently was corrected back to trivial for C++11.

Unfortunately (for libc++1) the Itanium ABI specifies different calling
conventions for trivial and non-trivial copy constructors.  Therefore
currently the C++03 libc++ copy constructor for pair<int, int> is ABI
incompatible with the C++11 libc++ copy constructor for pair<int, int>.
This is Bad(tm).   This patch corrects the situation by making this copy
constructor trivial in C++03 mode as well.

Just in case it is needed for an incomplete C++11 compiler, libc++
retains the ability to support pair with rvalue references, but without
defaulted special members.  However the pair needs non-trivial special
members to implement this special case, (as it did when clang was in
this place a couple of years ago).

During this work a bug was also found and fixed in
is_trivially_constructible.

And there is a minor drive-by fix in <__config> regarding
__type_visibility__.

A test is updated to ensure that the copy constructor of pair<int, int>
is trivial in both C++03 and C++11.  This test will necessarily fail for
a compiler that implements rvalue references but not defaulted special
members.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@194536 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-13 00:39:22 +00:00
Marshall Clow
ecc8d7b334 Fix an off-by-one error in basic_string::__grow_by, where it would incorrectly throw length_error (instead of bad_alloc) when attempting to resize the string to 'max_size()'. Add tests for resizing to max_size +/-1
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@194151 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-06 14:24:38 +00:00
Marshall Clow
76a8670ce4 LWG issue 2341; Make the two variants of basic_ostream::seekp and basic_istream::seekg behave consistently; update tests to make sure
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@193814 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-31 22:20:45 +00:00
Marshall Clow
09f8550e1c Fixes PR17148
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@193772 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-31 17:23:08 +00:00
Richard Smith
aa87532fee Avoid using the name 'bzero' for an enumerator in global scope. <strings.h> might declare this as a function.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@193066 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-21 04:59:37 +00:00
Howard Hinnant
71b52152a9 r192075 broke the buildbot at
http://lab.llvm.org:8013/builders/libcxx_clang-x86_64-darwin11-RA

lit.py: <string>:230: note: inferred use_system_lib as: False
lit.py: <string>:247: fatal: C++ ABI setting None unsupported for tests

cxx_abi is geting set to None, and the lit script errors out shortly after
that.  This patch changes the default of cxx_abi from None to 'libcxxabi'.
This is likely not the right way to fix this problem.  However it gets the
buildbot running again.  Improvements to this fix are welcome.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192609 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 18:02:02 +00:00