Commit Graph

2706 Commits

Author SHA1 Message Date
Eric Fiselier
a730ec37a9 Work around GCC bug in tests. The bug has been fixed in GCC 6.0
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273068 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 23:30:40 +00:00
Eric Fiselier
5c8a3688be Fix initialization of test case array in C++11
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273065 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 22:36:47 +00:00
Eric Fiselier
6f3b01af9c Fix bugs in recursive_directory_iterator implementation and tests.
There are two fixes in this patch:

* Fix bug where the constructor of recursive_directory_iterator did not reset
  the error code if no failure occurred.

* Fix tests were dependent on the iteration order of the test directories.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273060 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 22:22:37 +00:00
Eric Fiselier
40d9e09d89 Get filesystem tests passing for single-threaded configurations.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273054 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 21:44:26 +00:00
Eric Fiselier
841798ce01 Update status of filesystem issues, and add tests for LWG issue 2683
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273051 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 21:24:11 +00:00
Eric Fiselier
0c75540ba2 Reorder permissions test so they are not dependent on the processes umask
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273049 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 21:00:27 +00:00
Eric Fiselier
0354eb7228 Respect the processes umask in the create_directory test
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273048 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 20:54:25 +00:00
Eric Fiselier
e3f386aae3 Add missing space between >> in template declaration. Fixes C++03 build.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273037 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 20:16:46 +00:00
Eric Fiselier
05761e6861 Fix a couple of warnings present in the filesystem tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273035 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 19:57:54 +00:00
Eric Fiselier
6e9a694dce Add Filesystem TS -- Complete
Add the completed std::experimental::filesystem implementation and tests.
The implementation supports C++11 or newer.

The TS is built as part of 'libc++experimental.a'. Users of the TS need to
manually link this library. Building and testing the TS can be disabled using
the CMake option '-DLIBCXX_ENABLE_FILESYSTEM=OFF'.

Currently 'libc++experimental.a' is not installed by default. To turn on the
installation of the library use '-DLIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=ON'.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273034 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 19:46:40 +00:00
Ed Schouten
a8f47cc800 Remove CloudABI specific workaround.
CloudABI has gained the mblen_l() function in the meantime that does
properly return whether the character set has shift-states (read:
never).


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-16 11:53:11 +00:00
Dan Albert
b2ce77fc21 Add an Android version check for GNU strerror_r.
Summary:
Android didn't gain GNU's strerror_r until Marshmallow. If we're
building libc++ against something older (we build the NDK library
against the oldest release we support, currently Gingerbread), fall
back to the POSIX version.

Reviewers: mclow.lists, EricWF

Subscribers: tberghammer, danalbert, srhines, cfe-commits

Differential Revision: http://reviews.llvm.org/D21402

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272827 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 20:20:32 +00:00
Eric Fiselier
461797d21a Fix warning in tuple tests. The test suite should now run clean with most warnings enabled
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272822 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 19:41:52 +00:00
Eric Fiselier
6bdead7593 Add -Wno-unused-command-line-argument when running the test suite to prevent errors
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272809 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 17:25:05 +00:00
Eric Fiselier
12150a7eb0 Fix const default initialization of lock_guard<>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272804 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 17:04:40 +00:00
Eric Fiselier
629aa5670a [libcxx] [test] In test/support/test_allocator.h, fix construct() to avoid moving immovable types.
Summary:
In test/support/test_allocator.h, fix construct() to avoid moving immovable types.

This improves the allocator's conformance, and fixes compiler errors with MSVC's STL. The scenario is when the allocator is asked to construct an object of type X that's immovable (deleted copy/move ctors), but implicitly constructible from an argument type A. When perfectly forwarded, X can be (explicitly) constructed from A, and everything is fine. That's std::allocator's behavior, and the Standard's default when a user allocator's construct() doesn't exist. The previous implementation of construct() here mishandled this scenario. Passing A to this construct() would implicitly construct an X temporary, bound to (non-templated) T&&. Then construct() would attempt to move-construct X from that X temporary, but X is immovable, boom.

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D21094

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272747 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 01:53:32 +00:00
Eric Fiselier
42e3e187f5 Improve portability of random_device tests. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272746 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 01:50:31 +00:00
Eric Fiselier
c02ca7f4b0 Improve portability of vector tests. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272745 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 01:44:22 +00:00
Eric Fiselier
a995776958 Improve portability of hash tests. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272744 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 01:42:35 +00:00
Eric Fiselier
5fb49ff88c Automatically detect export lists for OS X.
Summary:
Libc++ reexports symbols from the system libc++abi using -reexport_symbols_list. This can cause a linker failure if the list contains symbols not defined in the system libc++abi.
This patch attempts to detect the OS X version and use it to determine the correct symbol list. 

It's my understanding that `lib/libc++abi2.exp` should be used on 10.9 and greater. Otherwise 'lib/libc++abi.exp' should be used

This fixes PR25666 (https://llvm.org/bugs/show_bug.cgi?id=25666)

Reviewers: mclow.lists, bcraig, dexonsmith, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D20772

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272723 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 21:55:14 +00:00
Eric Fiselier
d0eba8d313 Fix bad test that was previously getting ifdef-ed away
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272722 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 21:50:30 +00:00
Eric Fiselier
d24c465bea Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER.
This is a huge cleanup that helps make the libc++ test suite more portable.
Patch from STL@microsoft.com. Thanks STL!


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272716 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 21:31:42 +00:00
Marshall Clow
174432dbd5 Found a couple bugs in the test suite. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272679 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 15:25:46 +00:00
Eric Fiselier
d9e1819ef4 Partially Revert r272613. FreeBSD needs the non-trivial constructors in pair.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272671 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 14:34:19 +00:00
Eric Fiselier
5a623cf59f Update errcat.objects tests so they test the bug fixed in r272640.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272642 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 06:37:36 +00:00
Eric Fiselier
d3f1134dca Fix syntax error in r272640.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272641 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 06:08:10 +00:00
Eric Fiselier
17402e36fa Fix error checking for strerror_r implementations that return the error code.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272640 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 06:03:20 +00:00
Eric Fiselier
e443672b05 Avoid octal escape sequence warning with MSVC. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272639 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 05:47:46 +00:00
Eric Fiselier
10d7856f8f Add missing include
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272638 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 04:58:19 +00:00
Eric Fiselier
1f471cbe3e Temporarily XFAIL variadic lock_guard mangling test for GCC 4.9
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272637 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 04:45:26 +00:00
Eric Fiselier
10b52a0e56 Implement variadic lock_guard.
Summary:
This patch implements the variadic `lock_guard` paper. 

Making `lock_guard` variadic is a ABI breaking change because the specialization `lock_guard<_Mutex>` mangles differently then when it was the primary template. This change only provides variadic `lock_guard` in ABI V2 or when `_LIBCPP_ABI_VARIADIC_LOCK_GUARD` is defined.

Note that in ABI V2 `lock_guard` must always be declared as a variadic template, even in C++03, in order to keep the ABI consistent. For this reason `lock_guard` is forward declared as a variadic template in all standard dialects and therefore depends on variadic templates being provided as an extension in C++03. All supported versions of Clang and GCC provide this extension.




Reviewers: mclow.lists

Subscribers: K-ballo, mclow.lists, cfe-commits

Differential Revision: http://reviews.llvm.org/D21260

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272634 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 03:48:09 +00:00
Eric Fiselier
a30cee2258 Make system_error::message() thread safe. Fixes PR25598.
Summary:
system_error::message() uses `strerror` for the generic and system categories. This function is not thread safe.

The fix is to use `strerror_r`. It has been available since 2001 for GNU libc and since BSD 4.4 on FreeBSD/OS X.
On platforms with GNU libc the extended version is used which always returns a valid string, even if an error occurs.

In single-threaded builds `strerror` is still used.

See https://llvm.org/bugs/show_bug.cgi?id=25598

Reviewers: majnemer, mclow.lists

Subscribers: erik65536, cfe-commits, emaste

Differential Revision: http://reviews.llvm.org/D20903

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272633 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 03:45:31 +00:00
Eric Fiselier
55ae1f0e07 Ignore depricated warnings from <ext/hash_map> and <ext/hash_set>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272632 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 03:26:11 +00:00
Eric Fiselier
bfdae2062a Fix warnings in tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272629 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 03:21:49 +00:00
Eric Fiselier
202acb7fd3 Remove unused local var. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272622 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 02:55:21 +00:00
Eric Fiselier
afa2f4331a Prevent truncation warning. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272621 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 02:54:15 +00:00
Eric Fiselier
831bfc277c Fix vector<bool> tests that were using ints. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272620 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 02:53:04 +00:00
Eric Fiselier
d6c0cf0ebd Rename variables to prevent shadowing. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272619 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 02:51:13 +00:00
Eric Fiselier
5e3bf9c69a Avoid name shadowing in test. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272618 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 02:47:46 +00:00
Eric Fiselier
be6c5e18b3 Silence more unused variable warnings. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272617 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 02:46:39 +00:00
Eric Fiselier
bf5a4189d3 Remove _LIBCPP_TRIVIAL_PAIR_COPY_CTOR option.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272613 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 01:36:15 +00:00
Dan Albert
d8df1781e3 Add REQUIRES: c++experimental where appropriate.
Summary:
I haven't added it to all the tests, just those that fail without it
(those that aren't header only).

Reviewers: EricWF, mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D21247

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272443 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 22:45:11 +00:00
Evandro Menezes
42e8527d86 [streambuf] Added call to traits_type::copy to common case in xsgetn()
Patch by Laman Sole <laxman.g@partner.samsung.com>, Sebastian Pop
<s.pop@samsung.com>, Aditya Kumar <aditya.k7@samsung.com>

Differential Revision: http://reviews.llvm.org/D21103

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272401 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 16:00:29 +00:00
Marshall Clow
4241df3ef4 Make the comparison objects that we pass in for various tests look more like actual comparison objects. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272288 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 18:34:38 +00:00
Marshall Clow
94f5dfc59b Two more issues w/patches
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 14:50:38 +00:00
Marshall Clow
f486825a5e Add notes for 2688
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272216 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08 22:33:25 +00:00
Chris Bieneman
54f2d208b5 [CMake] Cleanup uses of USES_TERMINAL
Now that we are on CMake 3.4.3 we no longer need a version check around this.

This is the libcxx side of r272211.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272212 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08 22:20:28 +00:00
Marshall Clow
9e65b66426 Mark 2441 as ready
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272202 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08 21:25:38 +00:00
Marshall Clow
a5d22d57ed Patch ready for #2436
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272150 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08 14:54:35 +00:00
Marshall Clow
a8054c3017 Added notes for a bunch of the issues
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272050 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07 20:05:57 +00:00