Commit Graph

560 Commits

Author SHA1 Message Date
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
Marshall Clow a429ba738c Back out the <type_traits> changes from r198431; they were breaking when building with glibc. Need to find a better solution for PR18218.
llvm-svn: 198623
2014-01-06 18:12:50 +00:00
Marshall Clow d41295da72 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()
llvm-svn: 198431
2014-01-03 18:21:14 +00:00
Marshall Clow ce81aed463 Make cv_status a class enum. Fixes PR18314. Thanks to Andersca for the report and the patch.
llvm-svn: 197921
2013-12-23 22:14:27 +00:00
Marshall Clow c3deeb5f89 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.
llvm-svn: 196174
2013-12-03 00:18:10 +00:00
Marshall Clow e7d582a75c 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
llvm-svn: 196127
2013-12-02 18:08:31 +00:00
Marshall Clow a26fcc7989 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
llvm-svn: 196118
2013-12-02 17:00:56 +00:00
Marshall Clow 3772a46ab4 Fix for PRPR17934; based on a fix suggested by Peter Sommerlad
llvm-svn: 196058
2013-12-02 03:24:33 +00:00
Sylvestre Ledru 3973d59f9b Remove executable permissions on a text file
llvm-svn: 196041
2013-12-01 10:15:11 +00:00
Marshall Clow e34f6f6a12 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.
llvm-svn: 195785
2013-11-26 20:58:02 +00:00
Marshall Clow eed0bdee59 Fix a test that I broke over the weekend
llvm-svn: 195143
2013-11-19 19:14:27 +00:00
Marshall Clow dfdac03c8f Move <optional> into include/experimental, and into the std::experimental namespace, since it's not part of C++14, but of an upcoming TS
llvm-svn: 194867
2013-11-15 22:42:10 +00:00
Marshall Clow 513ecaba91 Fixed bug in quoted strings implementation. Added test to be sure. Thanks to Peter Sommerlad for the report (and suggested fix)
llvm-svn: 194725
2013-11-14 20:01:38 +00:00
Marshall Clow 21fee96f69 Move <dynarray> into include/experimental, and into the std::experimental namespace, since it's not part of C++14, but of an upcoming TS
llvm-svn: 194614
2013-11-13 22:44:48 +00:00
Howard Hinnant ccad8c32e0 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.

llvm-svn: 194536
2013-11-13 00:39:22 +00:00
Marshall Clow e427322327 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
llvm-svn: 194151
2013-11-06 14:24:38 +00:00
Marshall Clow e1bedf4e93 LWG issue 2341; Make the two variants of basic_ostream::seekp and basic_istream::seekg behave consistently; update tests to make sure
llvm-svn: 193814
2013-10-31 22:20:45 +00:00
Marshall Clow f5fa53882f Fixes PR17148
llvm-svn: 193772
2013-10-31 17:23:08 +00:00
Richard Smith 1483143e7a Avoid using the name 'bzero' for an enumerator in global scope. <strings.h> might declare this as a function.
llvm-svn: 193066
2013-10-21 04:59:37 +00:00
Howard Hinnant 58af7e177c 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.

llvm-svn: 192609
2013-10-14 18:02:02 +00:00
Marshall Clow d58daf9433 LWG Issue 2097: packaged_task constructors should be constrained
llvm-svn: 192544
2013-10-12 22:49:17 +00:00
Marshall Clow 8de32cb3dc Implement national body comment GB9: remove std::gets
llvm-svn: 192538
2013-10-12 19:09:47 +00:00
Marshall Clow db78c7049e Fix LWG Issue 2141: common_type trait produces reference types
llvm-svn: 192142
2013-10-07 23:43:33 +00:00
Marshall Clow 4f44079a2c Apparently, I don't know the difference between 'left' and 'right'. Swap parameters named 'lhs' and 'rhs' so that they correctly refer to the 'left hand side' and 'right hand side' of comparisons. No functionality change. Thanks to Arthur O'Dwyer for pointing this out to me.
llvm-svn: 192080
2013-10-07 02:37:18 +00:00
Peter Collingbourne 26dd09e57f Make it possible to link against libstdc++ as well as libsupc++ with CMake.
Linking against libstdc++, rather than libsupc++, is probably better
for people who need to link against clients of libstdc++.  Because
libsupc++ is provided only as a static library, its globals are not
shared between the static library and the copy linked into libstdc++.
This has been found to cause at least one test failure.

This also removes a number of symbols which were multiply defined
between libstdc++ and libc++, only when linking with libstdc++.

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

llvm-svn: 192075
2013-10-06 22:13:19 +00:00
Howard Hinnant 6d48bdd2a8 G M: 1. It changes the temp file handling to use the template and the current directory for windows, matching how it works on other platforms.
2. It re-enables the temp file handling for mingw that regressed.

llvm-svn: 192073
2013-10-06 21:14:05 +00:00
Marshall Clow d2f095e5ba Add tests making sure that optional<T>s can be compared at compile time; this functionality was enabled by N3789
llvm-svn: 192051
2013-10-05 23:29:16 +00:00
Marshall Clow dbd2ebb07e LWG Issue 2247: Implement type trait 'is_null_pointer'
llvm-svn: 192049
2013-10-05 21:21:17 +00:00
Marshall Clow ea7c7cc521 Implement literal suffixes for compled
llvm-svn: 192048
2013-10-05 21:19:49 +00:00