Commit Graph

1320 Commits

Author SHA1 Message Date
Eric Fiselier 6a05b007ff Test hijacking ADL for operator& in the stream iterator constructors.
llvm-svn: 269838
2016-05-17 21:01:20 +00:00
Eric Fiselier 7b65137677 Add test for r269789
llvm-svn: 269812
2016-05-17 19:52:32 +00:00
Marshall Clow 6c3fa193bf Add some checking so that the TEST_HAS_XXX macros match up with the _LIBCPP_NO_HAS_XXX macros. No functional change
llvm-svn: 269773
2016-05-17 14:58:09 +00:00
Marshall Clow 4328c2bac8 Implement P0030R1: Introduce a 3-Argument Overload to std::hypot
llvm-svn: 269772
2016-05-17 14:52:19 +00:00
Eric Fiselier 46a256a3eb Remove C++11 feature macros in tests. Use TEST_STD_VER instead.
llvm-svn: 269669
2016-05-16 17:05:14 +00:00
Marshall Clow 779ddd134d Add a test for uniqueptr having either NULL and nullptr
llvm-svn: 269665
2016-05-16 16:57:15 +00:00
Marshall Clow 1168ca925c Apply D20014 - fix a missing return in a test. Fixes PR#27720
llvm-svn: 269298
2016-05-12 14:31:35 +00:00
Eric Fiselier 31dd2b1c88 Generate code coverage for experimental libraries
llvm-svn: 268887
2016-05-08 23:08:50 +00:00
Eric Fiselier 4524d6e739 Change allocator<T>::allocate to throw length_error, not bad_alloc
llvm-svn: 268842
2016-05-07 03:12:24 +00:00
Eric Fiselier 522a7f9535 Add experimental container alias templates for PMRs
llvm-svn: 268841
2016-05-07 03:09:55 +00:00
Eric Fiselier 15551efd43 Add <experimental/memory_resource>
Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

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

llvm-svn: 268829
2016-05-07 01:04:55 +00:00
Eric Fiselier 57175711eb Tweak --param=no_default_flags=true to still add -Ilibcxx/test/support
llvm-svn: 268801
2016-05-06 21:35:06 +00:00
Eric Fiselier 4a9578aefe Removing some trailing whitespace
llvm-svn: 268543
2016-05-04 20:29:19 +00:00
Eric Fiselier ad89e3855c Make check-libcxx dependant on libc++experimental if present.
llvm-svn: 268451
2016-05-03 21:58:07 +00:00
Eric Fiselier 27cb2f1225 Create new library 'libc++experimental.a' for packaging TS symbols.
Summary:
Out-of-line symbols for <experimental/...> headers are not ABI or API stable and cannot live in the 'libc++.dylib'. Currently they have nowhere to live. I would like to add a new library target `libc++experimental.a` to fix this. 

Previously I had suggested different libraries for different TS's (`libc++filesystem.a`, 'libc++LFTS.a`, ect). I no longer think this is the right approach.
Instead `c++experimental` will hold *all* TS implementations as a single monolithic library. I see two main benefits to this:

1. Users only have to know about and manually link one library.
2. It makes it easy to implement TS's with one or two out-of-line symbols. (Ex. PMRs)

`c++experimental` provides NO ABI compatibility. Symbols can freely be added/removed/changed without concern for ABI stability.
I will add documentation for this after landing this patch (but before adding anything to it).

`c++experimental` only builds as a static library. By default CMake will build/test this library but will *NOT* install it.

This patch adds the CMake and LIT logic needed to build/test the new library. Once this lands I plan on using it to implement parts of `<experimental/memory_resource>`.



Reviewers: mclow.lists

Subscribers: cfe-commits, theraven, krememek, dexonsmith, bcraig, beanz, danalbert

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

llvm-svn: 268443
2016-05-03 21:30:18 +00:00
Eric Fiselier 95b632d4b9 Fix PR27538. Remove __is_convertible specializations for array and function types.
This patch fixes a bunch of bugs in the fallback implementation of
is_convertible, which is used by GCC. Removing the "__is_convertible"
specializations for array/function types we fallback on the SFINAE test,
which is more correct.

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

llvm-svn: 268359
2016-05-03 04:26:02 +00:00
Eric Fiselier 15a297212f [libcxx] [test] Replace non-Standard "atomic_flag f(false);" with Standard "atomic_flag f;"
Summary:
Replace non-Standard "atomic_flag f(false);" with Standard "atomic_flag f;" in clear tests.
Although the  value of 'f' is unspecified it shouldn't matter because these tests always call `f.test_and_set()` without checking the result, so the initial state shouldn't matter.

The test init03.pass.cpp is explicitly testing this non-Standard extension; It has been moved into the `test/libcxx` directory.

Reviewers: mclow.lists, STL_MSFT

Subscribers: cfe-commits

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

llvm-svn: 268355
2016-05-03 02:12:26 +00:00
Eric Fiselier 43a10eb637 Don't use std::__clz in 'test/support/hexfloat.h'.
std::__clz is a libc++ specific function so it can't be used in the test suite.
This patch implements a dumb "count leading zeros" implementation within
hexfloat itself.

This patch also fixes UB since the output of `__builtin_clz(0)` is undefined
according to the GCC docs.

llvm-svn: 268354
2016-05-03 02:04:26 +00:00
Eric Fiselier 4df2666da1 Guard use of <unistd.h> in test.
llvm-svn: 268346
2016-05-03 00:36:57 +00:00
Eric Fiselier 76af416afc Cleanup warnings and remove use of __builtin_va_list in depr.c.headers
llvm-svn: 268294
2016-05-02 20:08:16 +00:00
Eric Fiselier c090b04045 Initialize local doubles to NaN. Patch from STL@microsoft.com
llvm-svn: 268285
2016-05-02 19:20:16 +00:00
Eric Fiselier fb42f4c44a Void cast runtime-unused variables. Patch from STL@microsoft.com
llvm-svn: 268284
2016-05-02 19:15:48 +00:00
Eric Fiselier 53ca3c93db Replace one more occurrence of non-standard std:launch::any. Patch from STL@microsoft.com
llvm-svn: 268153
2016-04-30 02:30:18 +00:00
Eric Fiselier 3ed9f6ebde Fix PR21428 for long. Buffer was one byte too small in octal formatting case. Rename previously added test
llvm-svn: 268009
2016-04-29 07:23:20 +00:00
Eric Fiselier cc06271d12 Move extern C include test into test/libcxx
llvm-svn: 267983
2016-04-29 04:19:48 +00:00
Eric Fiselier cbeadbdbad Fix test failures by adding missing include
llvm-svn: 267982
2016-04-29 04:18:13 +00:00
Eric Fiselier 382e91792b Fix or move various non-standard tests.
This patch does the following:

* Remove <__config> includes from some container tests.
* Guards uses of std::launch::any in async tests because it's an extension.
* Move "test/std/extensions" to "test/libcxx/extensions"
* Moves various non-standard tests including those in "sequences/vector",
  "std/localization" and "utilities/meta".

llvm-svn: 267981
2016-04-29 04:07:45 +00:00
Eric Fiselier bc32b5cf8f Move INVOKE tests into test/libcxx sub-tree.
Testing the concrete implementation of INVOKE means calling the implementation
specific names `__invoke` and `__invoke_constexpr`. For this reason the test
are non-standard. For this reason it's best if the tests live outside of the
`test/std` directory.

llvm-svn: 267973
2016-04-29 01:52:57 +00:00
Eric Fiselier 23323e25f8 Fix possible test breakage for MinGW
llvm-svn: 267968
2016-04-29 01:22:16 +00:00
Eric Fiselier 903f1ab93a Fix get_temp_file_name() to compile on Windows. Patch from STL@microsoft.com
llvm-svn: 267963
2016-04-29 00:51:24 +00:00
Eric Fiselier a643eb7ec0 Remove more names of unreferenced parameters. Patch from STL@microsoft.com
llvm-svn: 267962
2016-04-29 00:47:16 +00:00
Eric Fiselier 6abce62b4e Add a return value for nasty_mutex::operator&. Patch from STL@microsoft.com
llvm-svn: 267961
2016-04-29 00:45:46 +00:00
Eric Fiselier 6c5edd1263 Add <string> include for streaming operators. Patch from STL@microsoft.com
llvm-svn: 267959
2016-04-29 00:39:40 +00:00
Eric Fiselier 7d7d2c0edd Add proper include for unique_ptr. Patch from STL@microsoft.com
llvm-svn: 267958
2016-04-29 00:37:56 +00:00
Eric Fiselier 1f4231f8cf Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macros
llvm-svn: 267947
2016-04-28 22:28:23 +00:00
Eric Fiselier 7626f778a5 Remove names of unreferenced parameters. Patch from STL@microsoft.com
llvm-svn: 267852
2016-04-28 03:17:56 +00:00
Eric Fiselier 0d62791983 Add braces, move braces, and rename variables to avoid shadowing. Patch from STL@microsoft.com
llvm-svn: 267844
2016-04-28 02:45:11 +00:00
Eric Fiselier 0f9e91acc8 Provide member function definitions to avoid warnings. Patch from STL@microsoft.com
llvm-svn: 267843
2016-04-28 02:18:48 +00:00
Eric Fiselier 588e1dbda2 Rename function parameters to avoid shadowing. Patch from STL@microsoft.com
llvm-svn: 267838
2016-04-28 02:00:52 +00:00
Eric Fiselier e5eb7049eb Guard Clang and GCC specific pragmas. Patch from STL@microsoft.com
llvm-svn: 267836
2016-04-28 01:49:03 +00:00
Marshall Clow 91929f643e Fix = that should have been == in test. Thanks to STL@microsoft for the catch
llvm-svn: 267654
2016-04-27 01:46:43 +00:00
Marshall Clow 8dc9dcaeac Apparently XFAIL tests that are supposed to fail to compile can be problematic. They still get compiled, and if the compile succeeds, the buildbots complain. Replace the XFAIL with #error.
llvm-svn: 267591
2016-04-26 19:29:35 +00:00
Marshall Clow fd5ceb2228 #include <test_macros.h> in all the regex tests, and remove all mentions of __cpluplus (use TEST_STD_VERS and/or XFAIL instead). No functional change
llvm-svn: 267567
2016-04-26 16:24:44 +00:00
Marshall Clow a64a8fc969 Rename a few tests that had typos in their names. No functional change. Thanks to STL for the catch
llvm-svn: 267287
2016-04-23 14:31:00 +00:00
Eric Fiselier b530a2591b Fix some non-standard parts of our test suite. Reported by STL
llvm-svn: 267131
2016-04-22 10:33:56 +00:00
Marshall Clow f8997cf5ae Add missing include of <algorithm>
llvm-svn: 267119
2016-04-22 07:39:05 +00:00
Eric Fiselier 906c50859b Fix LWG issue #2106: move_iterators returning prvalues
llvm-svn: 267091
2016-04-22 00:49:12 +00:00
Eric Fiselier b7f045fc7d Fix C++03 build breakage
llvm-svn: 267090
2016-04-22 00:47:15 +00:00
Eric Fiselier d513ad88d5 Complete LWG issue #2016. Allocators must be nothrow swappable
llvm-svn: 267085
2016-04-22 00:15:18 +00:00
Eric Fiselier f07dd8d0a9 Add is_swappable/is_nothrow_swappable traits
llvm-svn: 267079
2016-04-21 23:38:59 +00:00