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
Asiri Rathnayake
1575e3e813
[libcxx] Fix c++98 test failures.
...
Adds XFAIL/UNSUPPORTED lit tags as appropriate. Gets a clean test run
for -std=c++98 on Fedora 20.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271741 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-03 21:40:03 +00:00
Eric Fiselier
3bf0d98eb1
Add not_fn test for throwing operator!
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271502 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 08:37:00 +00:00
Eric Fiselier
03b9c6b922
Mark LWG issue 2545 as complete. Add extra tests
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271489 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 05:44:14 +00:00
Eric Fiselier
b36940bb34
Fix leak in __enable_weak_this(). Thanks to Arthur O'Dwyer for finding it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271487 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 04:57:00 +00:00
Eric Fiselier
e98bd2a486
Mark LWG issue 2250 as complete
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271475 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 04:03:31 +00:00
Eric Fiselier
400d356341
Mark LWG issue 2450 as complete.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271473 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 03:12:44 +00:00
Eric Fiselier
c230822a61
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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271464 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 01:25:41 +00:00
Eric Fiselier
dbfa5b6ea7
Remove enable_shared_from_this test since it leaks the control block and fails with ASAN
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 01:09:12 +00:00
Eric Fiselier
18e1ea69ae
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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271449 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 00:15:35 +00:00
Eric Fiselier
84acb1ec3f
Remove trailing whitespace in test suite. Approved by Marshall Clow.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 21:35:39 +00:00
Eric Fiselier
8a8c114479
Mark LWG issue 2520 as complete
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 04:27:57 +00:00
Eric Fiselier
979137793e
Mark LWG issue 2565 as complete. Update the tests to check it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271238 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 00:23:31 +00:00
Asiri Rathnayake
a3eac518e6
[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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271108 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 08:57:35 +00:00
Eric Fiselier
1f21fcd10a
Guard testing of tuple extensions to make tests portable
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271065 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 22:41:45 +00:00
Marshall Clow
5d98497d0b
Add a test for uniqueptr having either NULL and nullptr
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@269665 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 16:57:15 +00:00
Marshall Clow
aee206a3a1
Apply D20014 - fix a missing return in a test. Fixes PR#27720
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@269298 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 14:31:35 +00:00
Eric Fiselier
4db388b579
Change allocator<T>::allocate to throw length_error, not bad_alloc
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268842 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-07 03:12:24 +00:00
Eric Fiselier
8a7462d163
Removing some trailing whitespace
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268543 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-04 20:29:19 +00:00
Eric Fiselier
6aec0206da
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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268359 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-03 04:26:02 +00:00
Eric Fiselier
a9ea11398d
Void cast runtime-unused variables. Patch from STL@microsoft.com
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268284 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-02 19:15:48 +00:00
Eric Fiselier
1e5a4a4a71
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".
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267981 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 04:07:45 +00:00
Eric Fiselier
96becae308
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267973 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 01:52:57 +00:00
Eric Fiselier
6531a09dc7
Add proper include for unique_ptr. Patch from STL@microsoft.com
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267958 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 00:37:56 +00:00
Eric Fiselier
375e2f669c
Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macros
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267947 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 22:28:23 +00:00
Eric Fiselier
bda804ea25
Remove names of unreferenced parameters. Patch from STL@microsoft.com
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267852 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 03:17:56 +00:00
Eric Fiselier
849c551745
Add braces, move braces, and rename variables to avoid shadowing. Patch from STL@microsoft.com
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 02:45:11 +00:00
Eric Fiselier
ce24f965f1
Provide member function definitions to avoid warnings. Patch from STL@microsoft.com
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 02:18:48 +00:00
Eric Fiselier
4596c29195
Guard Clang and GCC specific pragmas. Patch from STL@microsoft.com
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267836 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 01:49:03 +00:00
Marshall Clow
d7f1f971d1
Rename a few tests that had typos in their names. No functional change. Thanks to STL for the catch
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-23 14:31:00 +00:00
Eric Fiselier
5ccbc48774
Fix some non-standard parts of our test suite. Reported by STL
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267131 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22 10:33:56 +00:00
Eric Fiselier
8f1e73dfd2
Add is_swappable/is_nothrow_swappable traits
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267079 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 23:38:59 +00:00
Eric Fiselier
8d5cbd7ce2
Add 'is_callable' and 'is_nothrow_callable' traits and cleanup INVOKE.
...
The primary purpose of this patch is to add the 'is_callable' traits.
Since 'is_nothrow_callable' required making 'INVOKE' conditionally noexcept
I also took this oppertunity to implement a constexpr version of INVOKE.
This fixes 'std::experimental::apply' which required constexpr 'INVOKE support'.
This patch will be followed up with some cleanup. Primarly removing most
of "__member_function_traits" since it's no longer used by INVOKE (in C++11 at least).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266836 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-20 00:14:32 +00:00
Ben Craig
9c6f00d616
XFAILing new test on C++03
...
initializer_list doesn't exist in C++03.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266820 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 21:07:30 +00:00
Ben Craig
d59d416bc9
Include initializer_list from utility
...
The C++11 and C++14 standards both say in the header <utility> synopsis that
<utility> shall include <initializer_list>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266808 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 20:13:55 +00:00
Eric Fiselier
95526d31cb
Make tuples constructors conditionally EXPLICIT. See N4387
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 01:19:25 +00:00
Eric Fiselier
134ff65b8f
Implement LWG issue 2219 - support reference_wrapper in INVOKE
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266590 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 06:17:30 +00:00
Eric Fiselier
b952822a48
Add hash specializations for __int128_t. Fixes LWG issue 2119
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266587 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 02:54:00 +00:00
Eric Fiselier
c325f3dccf
Add tests for LWG issue 2361
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266586 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 02:31:05 +00:00
Eric Fiselier
d5019333fa
Cleanup and guard tuple's constructor SFINAE. Fixes PR22806 and PR23256.
...
There are two main fixes in this patch.
First the constructor SFINAE was changed so that it's evaluated in two stages
where the first stage evaluates the "safe" SFINAE conditions and the second
evaluates the "dangerous" ones. The key is that the second stage is lazily
evaluated only if the first stage passes. This helps fix PR23256
(https://llvm.org/bugs/show_bug.cgi?id=23256 ).
The second fix is for PR22806 and LWG issue 2549. This fix applies
the suggested resolution to the LWG issue in order to prevent the construction
of dangling references. The SFINAE for this check is contained within
the _PreferTupleLikeConstructor alias template. The tuple-like constructors
are disabled whenever that trait returns false.
(https://llvm.org/bugs/show_bug.cgi?id=22806 )
(http://cplusplus.github.io/LWG/lwg-active.html#2549 )
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266461 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-15 18:05:59 +00:00
Eric Fiselier
55ad3ac786
[libcxx] Remove the "reduced-arity-initialization" extension from the uses-allocator constructors
...
Summary:
A default uses-allocator constructor has been added since that overload was previously provided by the extended constructor.
Since Clang does implicit conversion checking after substitution this constructor has to deduce the allocator_arg_t parameter so that it can prevent the evaluation of "is_default_constructible" if the first argument doesn't match. See http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1391 for more information.
This patch fixes PR24779 (https://llvm.org/bugs/show_bug.cgi?id=24779 )
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19006
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266409 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-15 03:29:40 +00:00
Eric Fiselier
735026e3ee
Make std::addressof constexpr in C++17 (Clang only).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@263688 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-17 03:30:56 +00:00
Marshall Clow
d8b9e0bbff
Mark exception-throwing test as XFAIL when exceptions are disabled
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@263405 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-14 02:51:50 +00:00
Marshall Clow
4951a48a6a
Fix for PR26812: possible overflow issue in std::allocator::allocate
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@262610 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-03 12:04:39 +00:00
Marshall Clow
7490f53118
Added tests to make sure that the categorization traits work on incomplete types
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@261925 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 20:15:47 +00:00
Marshall Clow
17a80bc8b6
No, really - test the constructor
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@261875 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 15:27:13 +00:00
Marshall Clow
5425ba06f6
Add test to ensure that the converting constructor in N4089 is present and working
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@261874 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 15:25:29 +00:00
Marshall Clow
a4abce578a
These new tests fail on the green-dragon bots, which use an old Apple compiler.
...
Since they're scheduled to be updated soon, we'll just comment out this test for
the moment, and re-commit when the bots are updated.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@261661 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-23 18:09:38 +00:00
Marshall Clow
c310174934
Add tests for LWG#2560. No code changes, just tests
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@261653 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-23 17:01:52 +00:00
Eric Fiselier
e01f946792
Fix PR26103 - Error calling is_convertible with incomplete type. Patch from Michael Daniels.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@258852 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 20:24:30 +00:00