Commit Graph

2639 Commits

Author SHA1 Message Date
Eric Fiselier 881334e76b Add not_fn test for throwing operator!
llvm-svn: 271502
2016-06-02 08:37:00 +00:00
Eric Fiselier eb066bc29d Fix TEST_HAS_NO_EXCEPTIONS misspelling in the test suite.
llvm-svn: 271501
2016-06-02 08:19:02 +00:00
Eric Fiselier 58ff77c2e0 Mark LWG issue 2545 as complete. Add extra tests
llvm-svn: 271489
2016-06-02 05:44:14 +00:00
Eric Fiselier 7cf29e3468 Fix leak in __enable_weak_this(). Thanks to Arthur O'Dwyer for finding it.
llvm-svn: 271487
2016-06-02 04:57:00 +00:00
Eric Fiselier 9b903af3e9 Mark LWG issue 2218 as complete.
LWG issue 2218 relaxes a restriction on how containers can call
Alloc::construct(...) and Alloc::destroy(...). There is nothing new to test.

llvm-svn: 271477
2016-06-02 04:13:41 +00:00
Eric Fiselier 91ae4a078b Mark LWG issue 2336 as complete. There is nothing to do.
llvm-svn: 271476
2016-06-02 04:08:03 +00:00
Eric Fiselier 4efa1ad561 Mark LWG issue 2250 as complete
llvm-svn: 271475
2016-06-02 04:03:31 +00:00
Eric Fiselier d697ee41bc Mark LWG issue 2450 as complete.
llvm-svn: 271473
2016-06-02 03:12:44 +00:00
Eric Fiselier e44604aec7 Update libcxx.llvm.org documentation by linking to new docs.
Summary:
Currently much of the libcxx website is duplicated between the old www/ documentation and newer Sphinx docs. This patch changes the main libc++ webpage so that it links to the new documentation where possible. This means removing numerous sections from the landing page.

@mclow.lists What do you think?

Reviewers: mclow.lists

Subscribers: cfe-commits, mclow.lists

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

llvm-svn: 271469
2016-06-02 02:16:28 +00:00
Eric Fiselier 5725756791 Add C++17 std::not_fn negator.
Summary:
Exactly what it sounds like.

I plan to commit this in a couple of days assuming no objections.

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

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

llvm-svn: 271464
2016-06-02 01:25:41 +00:00
Eric Fiselier a4f2460fa5 [libcxx] Allow target flags to affect CMake configuration tests
Summary:
This patch changes the libc++ CMake so that it adds certain target flags like '-m32' or '--gcc-toolchain' before including config-ix.cmake.
Since these flags can affect things like check_library_exists([...]) they needed to be added before the tests are performed.

This patch fixes:

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

Reviewers: danalbert, jroelofs, bcraig, compnerd

Subscribers: cfe-commits

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

llvm-svn: 271460
2016-06-02 01:10:08 +00:00
Eric Fiselier 39a724ea36 Remove enable_shared_from_this test since it leaks the control block and fails with ASAN
llvm-svn: 271459
2016-06-02 01:09:12 +00:00
Eric Fiselier 88f5bfdc5b Implement P0033R1 - Re-enabling shared_from_this
Summary: See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0033r1.html

Reviewers: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 271449
2016-06-02 00:15:35 +00:00
Eric Fiselier d04c685168 Remove trailing whitespace in test suite. Approved by Marshall Clow.
llvm-svn: 271435
2016-06-01 21:35:39 +00:00
Eric Fiselier eb5cfb02d6 Cleanup non-standard tests as reported by STL@microsoft.com. NFC.
This patch addresses the following issues in the test suite:

1. Move "std::bad_array_length" test from std/ to libcxx/ test directory
   since the feature is not a part of the standard.

2. Rename "futures.tas" test directory to "futures.task" since that is the
   correct stable name.

3. Move tests for "packaged_task<T>::result_type" from std/ to libcxx/
   test directory since the typedef is a libc++ extension.

llvm-svn: 271430
2016-06-01 21:05:53 +00:00
Chris Bieneman 752cd33136 [CMake] Update to requiring CMake 3.4.3
Summary:
This is as per the discussions on developer lists:

http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html
http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html

Subscribers: cfe-commits

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

llvm-svn: 271329
2016-05-31 20:21:52 +00:00
Marshall Clow 30bffb9dcf Issues for Oulu
llvm-svn: 271282
2016-05-31 14:29:38 +00:00
Eric Fiselier 7939ae5e08 Mark LWG issue 2520 as complete
llvm-svn: 271249
2016-05-31 04:27:57 +00:00
Eric Fiselier b56f446e2d Add tests that got missed in r271247.
llvm-svn: 271248
2016-05-31 01:51:34 +00:00
Eric Fiselier 5362bbb02a Mark LWG issue 2276 as complete. Add _LIBCPP_ASSERTS for it
llvm-svn: 271247
2016-05-31 01:50:55 +00:00
Eric Fiselier 3bdbb10a48 Mark LWG issue 2537 as complete
llvm-svn: 271241
2016-05-31 01:11:20 +00:00
Eric Fiselier 0ddc14c256 Mark LWG issue #2585 as complete
llvm-svn: 271240
2016-05-31 01:03:07 +00:00
Eric Fiselier 4c46801fa7 Mark LWG issue 2565 as complete. Update the tests to check it.
llvm-svn: 271238
2016-05-31 00:23:31 +00:00
Eric Fiselier af4a5a7f33 Make string_view work with -fno-exceptions and get tests passing.
llvm-svn: 271237
2016-05-30 23:53:19 +00:00
Eric Fiselier 424b5ee8f7 Cleanup error handling when TLS creation fails
llvm-svn: 271235
2016-05-30 23:15:19 +00:00
Eric Fiselier 928431af53 Mark LWG issue #2522 as complete
llvm-svn: 271231
2016-05-30 21:30:46 +00:00
Eric Fiselier 9ef549212c Fix bug in test allocator that incorrectly computed the allocation size
llvm-svn: 271195
2016-05-30 01:31:04 +00:00
Asiri Rathnayake 6edc12c886 [libcxx] Improve tests to use the UNSUPPORTED lit directive
Quite a few libcxx tests seem to follow the format:
 #if _LIBCPP_STD_VER > X
   // Do test.
 #else
   // Empty test.
 #endif
We should instead use the UNSUPPORTED lit directive to exclude the test on
earlier C++ standards. This gives us a more accurate number of test passes
for those standards and avoids unnecessary conflicts with other lit
directives on the same tests.

Reviewers: bcraig, ericwf, mclow.lists

Differential revision: http://reviews.llvm.org/D20730

llvm-svn: 271108
2016-05-28 08:57:35 +00:00
Eric Fiselier 71c425f199 Add missing include to test_iterators.h
llvm-svn: 271074
2016-05-27 23:43:29 +00:00
Eric Fiselier 139dc2d728 Fix PR27751. Add proper dependancies for install-libcxx-headers rule
llvm-svn: 271073
2016-05-27 23:33:10 +00:00
Eric Fiselier 72a819e155 Fix PR27875. Parse LIBCXX_CXX_ABI_LIBRARY_PATH as a path not a string
llvm-svn: 271070
2016-05-27 23:05:37 +00:00
Eric Fiselier 38e229f909 Guard testing of tuple extensions to make tests portable
llvm-svn: 271065
2016-05-27 22:41:45 +00:00
Eric Fiselier 589308a0b1 Tolerate incorrect return type for 'isinf' and 'isnan' in tests.
Summary:
GLIBC recently removed the incorrect `int isinf(double)` and `int isnan(double)` overloads in C++11 and greater. This causes previously `XFAIL: linux`  tests to start passing.

Since there is no longer a way to 'XFAIL' the tests I choose to simply tolerate this bug.

See https://sourceware.org/bugzilla/show_bug.cgi?id=19439


Reviewers: rsmith, mclow.lists, EricWF

Subscribers: jroelofs, cfe-commits

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

llvm-svn: 271060
2016-05-27 22:19:53 +00:00
Ben Craig b9599b1b23 [libcxx] Allow explicit pthread opt-in
The existing pthread detection code in __config is pretty good for
common operating systems. It doesn't allow cmake-time choices to be
made for uncommon operating systems though.

This change adds the LIBCXX_HAS_PTHREAD_API cmake flag, which turns
into the _LIBCPP_HAS_THREAD_API_PTHREAD preprocessor define. This is
a name change from the old _LIBCPP_THREAD_API_PTHREAD. The lit tests
want __config_site.in variables to have a _LIBCPP_HAS prefix.

http://reviews.llvm.org/D20573

llvm-svn: 270735
2016-05-25 17:40:09 +00:00
Ben Craig 57b8b1f75f Reorganize locale extension fallbacks. NFCI
The various _l locale extension functions originate from very
different places.  Some come from POSIX, some are BSD extensions,
and some are shared BSD and GLIBC extensions. This patch tries to
group the local extension reimplementations by source. This should
make it easier to make libcxx work with POSIX compliant C libraries
that lack these extensions.

The fallback locale functions are also useful on their own for other
lightweight platforms. Putting these fallback implementations in
support/xlocale should enable code sharing.

I have no access to a newlib system or an android system to build
and test with. I _do_ have access to a system without any of the _l
locale extensions though, and I was able to ensure that the new
__posix_l_fallback.h and __strtonum_fallback.h didn't have any massive
problems.

http://reviews.llvm.org/D17416

llvm-svn: 270213
2016-05-20 12:58:41 +00:00
Eric Fiselier 53df829bd1 Cleanup superfluous std:: qualifiers in <type_traits>
llvm-svn: 269998
2016-05-18 23:09:24 +00:00
Eric Fiselier ae7619a8a3 Optimize declval for compile times. Patch from Eric Niebler.
This patch implements the C++11 version of declval without requiring a template
instantiation.

See PR27798 for more information. https://llvm.org/bugs/show_bug.cgi?id=27798

llvm-svn: 269991
2016-05-18 22:23:46 +00:00
Marshall Clow 2dd562e3d9 Mark LWG2583 as complete. I did this a while ago, and forgot to update the table.
llvm-svn: 269973
2016-05-18 19:31:01 +00:00
Marshall Clow 3379baeb99 Change the control flow in atomic_compare_exchange_strong to avoid a potential deadlock.
When you assign a shared_ptr, the deleter gets called and assigned. In this routine, the assignment happens inside a critical section, which could (potentially) lead to a deadlock, if the deleter did something wonky. Now we swap the old value with an (empty) temporary shared_ptr, and then let the temporary delete the old value when it goes out of scope (after the lock has been released).  This should fix PR#27724. Thanks to Hans Boehm for the bug report and the suggested fix.

llvm-svn: 269965
2016-05-18 17:50:13 +00:00
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 bc6a7df072 Implement LWG2576: istream_iterator and ostream_iterator should use std::addressof
llvm-svn: 269789
2016-05-17 17:44:40 +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 0e1c6c7ed1 Add a couple of _LIBCPP_ASSERT calls. No functional change.
llvm-svn: 269663
2016-05-16 16:55:32 +00:00
Asiri Rathnayake 28383a4e03 Disable LIBCXX_ENABLE_ABI_LINKER_SCRIPT for static library builds.
This option is geared towards shared library builds and causes static
library builds to fail if not explicitly disabled.

This patch fixes PR27706: https://llvm.org/bugs/show_bug.cgi?id=27706

Thanks rgoodfel@isi.edu for the catch.

llvm-svn: 269585
2016-05-14 23:58:11 +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 a5e201fd55 [libcxx] Prefer C++14 over C++11 when building libc++experimental.
Summary:
Currently libc++experimental builds with C++11. This patch changes that to C++14 when supported by the compiler. Although nothing currently requires C++14 the upcoming <experimental/memory_resource> implementation would benefit from it. [1]

Note that libc++.so continues to build with C++11 and is unaffected by this change.

[1] <experimental/memory_resource> provides global resources which must exist for the entire lifetime of the program. In order to ensure that a global resource can be used during program termination there destructors must never be invoked. The only way to do this, while also allowing "constant initialization", is to use a C++14 union.


Reviewers: mclow.lists

Subscribers: pete, cfe-commits

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

llvm-svn: 269070
2016-05-10 16:17:43 +00:00