Commit Graph

2786 Commits

Author SHA1 Message Date
Eric Fiselier
8db06d71c2 Make instreambuf.iterator/types.pass.cpp more portable.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274207 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-30 04:31:09 +00:00
Eric Fiselier
68d0f230e9 Fix use of terse static assert. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274206 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-30 04:29:12 +00:00
Eric Fiselier
16715b9a88 Fix unary_function inheritance assumption. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274205 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-30 04:28:12 +00:00
Eric Fiselier
eb4c5e90a7 Fix unreferenced parameter warning. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274204 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-30 04:22:58 +00:00
Eric Fiselier
3a60979362 Avoid applying unary minus to unsigned integers. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274203 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-30 04:21:52 +00:00
Akira Hatanaka
70bf1c2280 [libcxx] Fix a bug in strstreambuf::overflow.
The end pointer should point to one past the end of the newly allocated
buffer.

rdar://problem/24265174

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


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274132 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 15:26:13 +00:00
Marshall Clow
05d5c05fe8 Use WG21.link reflector to get to issues, rather than linking directly
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274018 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 14:13:28 +00:00
Marshall Clow
01ac037a5b Updated C++1Z status page with new work from Oulu WG21 meeting
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 14:11:54 +00:00
Marshall Clow
871506f9c2 Fix bad link for P0006
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273861 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-27 11:14:34 +00:00
Eric Fiselier
928a58f7d2 Fix UB in uses_alloc_types.hpp
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-27 01:52:14 +00:00
Eric Fiselier
83d7ca9ea5 Implement P0163r0. Add shared_ptr::weak_type.
This patch adds the weak_type typedef in shared_ptr. It is available in
C++17 and newer.

This patch also updates the _LIBCPP_STD_VER and TEST_STD_VER macros to
have the value of 16, since 2016 is the current year.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-27 01:02:43 +00:00
Eric Fiselier
5781358757 Implement p0337r0. Delete operator= for polymorphic_allocator.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273838 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-27 00:55:25 +00:00
Eric Fiselier
715ca51666 Implement P0358r1. Fixes for not_fn.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273837 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-27 00:40:41 +00:00
Eric Fiselier
c297a25c55 Fix C++03 failure in enable_shared_from_this test
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273836 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-27 00:38:28 +00:00
Eric Fiselier
7838768593 Fix PR27115 - enable_shared_from_this does not work as a virtual base class.
See https://llvm.org/bugs/show_bug.cgi?id=27115

The problem was that the conversion from
'const enable_shared_from_this<T>*' to 'const T*' didn't work if
T inherited enable_shared_from_this as a virtual base class. The fix
is to take the original pointer passed to shared_ptr's constructor in the
__enable_weak_this method and perform an upcast to 'const T*' instead of
performing a downcast from the enable_shared_from_this base.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273835 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 23:56:32 +00:00
Eric Fiselier
7a317cec51 Fix C++03 build
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273832 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 23:18:23 +00:00
Eric Fiselier
e7aabbb6c6 Fix PR28079 - std::wstring_convert move constructor broken.
The move constructor for wstring_convert accidentally copied the state member
into the converted count member in the move constructor. This patch fixes
the typo.

While working on this I discovered that wstring_convert doesn't actually
provide a move constructor according to the standard and therefore this
constructor is a libc++ extension. I'll look further into whether libc++ should
provide this constructor at all. Neither libstdc++ or MSVC's STL provide it.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273831 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 22:56:26 +00:00
Eric Fiselier
abd892af3a Implement LWG 2488 - Make the placeholders constexpr.
This patch makes the bind placeholders in std::placeholders both (1) const and
(2) constexpr (See below).

This is technically a breaking change for any code using the placeholders
outside of std::bind and depending on them being non-const. However I don't
think this will break any real world code.

(1) Previously the placeholders were non-const extern globals in all
dialects. This patch changes these extern globals to be const in all dialects.
Since the cv-qualifiers don't participate in name mangling for globals this
is an ABI compatible change.

(2) Make the placeholders constexpr in C++11 and beyond. Although LWG 2488 only
applies to C++17 I don't see any reason not to backport this change.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273824 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 21:01:34 +00:00
Eric Fiselier
5078baa9e0 Make default_noexcept.pass.cpp container tests more portable. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273823 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 20:21:22 +00:00
Eric Fiselier
47920eb75e Work around MSVC bug in atomics.types.generic/address.pass.cpp test. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273822 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 19:59:11 +00:00
Eric Fiselier
a8c717009e Use L"cat" L"dog" when concatenating string literals. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273821 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 19:53:46 +00:00
Eric Fiselier
256f000cdc Add array bounds assertions to satisfy MSVC's /analyze flag. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273820 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 19:48:29 +00:00
Eric Fiselier
8c4dc32424 Add [[noreturn]] attribute to throw_bad_alloc_helper().
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273819 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 19:42:59 +00:00
Eric Fiselier
bbd1c53610 Avoid narrowing conversions in quoted test. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273818 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 19:37:23 +00:00
Weiming Zhao
dd421f5acd [libcxx] guard throw with exception enabling check
Summary: this fixes build error when built with c++14 and no exceptions

Reviewers: rmaprath

Subscribers: weimingz, grandinj, rmaprath, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273697 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24 18:02:27 +00:00
Eric Fiselier
3aef68f27e Run list debug copy test in C++03.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 08:57:33 +00:00
Eric Fiselier
8d2b31567c Finish converting list _LIBCPP_DEBUG tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 08:47:43 +00:00
Eric Fiselier
111c696838 Cleanup _LIBCPP_DEBUG tests in std::list. More to come.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273393 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 08:01:27 +00:00
Eric Fiselier
55e084dd4d Cleanup filesystem::permissions ever more.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273392 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 07:57:38 +00:00
Eric Fiselier
e1a1a1ffb7 Avoid unnecessary stat call in filesystem::permissions implementation.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 07:24:00 +00:00
Eric Fiselier
420dea528a Disable ccache usage for .fail.cpp tests. It causes bugs.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273390 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 07:09:59 +00:00
Eric Fiselier
f5b30213b6 Placate MSVC's unchecked malloc warning in thread tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273385 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 05:44:08 +00:00
Eric Fiselier
cef97f9cc9 Use correct Clang feature names. I got them wrong in the previous commit
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 05:40:17 +00:00
Eric Fiselier
8905b11d2d Support old GCC exception and rtti detection macros
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 05:33:52 +00:00
Eric Fiselier
b5fb8c9e39 Add tests for RTTI/exceptions test macros.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273382 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 05:29:15 +00:00
Eric Fiselier
5cdd5437e1 Fix exception/rtti detection in tests.
So the macros TEST_HAS_NO_EXCEPTIONS and TEST_HAS_NO_RTTI were always
getting defined because I spelt __cpp_exceptions and __cpp_rtti as
__cxx_exceptions and __cxx_rtti.

Tests incoming after this patch.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 05:03:10 +00:00
Eric Fiselier
d61ea34a58 Make shared_ptr constructor tests use count_new.hpp
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273379 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 04:51:07 +00:00
Eric Fiselier
770c6885af Make locale constructors tests use count_new.hpp
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273375 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 04:34:24 +00:00
Eric Fiselier
7d4a984cea Placate MSVC's unchecked malloc warnings.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 04:23:54 +00:00
Eric Fiselier
2aa1c4af39 UBSan doesn't globally replace new/delete but it still makes some tests fail. Investigation needed.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273372 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 04:00:45 +00:00
Eric Fiselier
506f9d5bd3 Cleanup [list.modifiers] tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273371 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 03:46:32 +00:00
Eric Fiselier
604b5c48ec Don't use non-conforming pointer_traits specialization it tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273368 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 02:31:32 +00:00
Eric Fiselier
22bff1afcc Move remaining _LIBCPP_VERSION tests into test/libcxx
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273367 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 02:23:22 +00:00
Eric Fiselier
67ec8a281b Move more _LIBCPP_VERSION tests to test/libcxx.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273365 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 02:07:26 +00:00
Eric Fiselier
b065399890 Move all tests for _LIBCPP_VERSION in language.support to test/libcxx/language.support.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273364 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 01:55:59 +00:00
Eric Fiselier
b93bc9a9ed Move typoed dir meta.hel to meta.help
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 01:42:39 +00:00
Eric Fiselier
3c0e3eb9d2 Use static_assert instead of runtime assert in std::money_base tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 01:40:46 +00:00
Eric Fiselier
63a0af7a79 Remove locale tests that depend on LC_ALL. These are non-portable.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273359 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 01:33:38 +00:00
Eric Fiselier
03dacbe87a Fix comment typos, strip trailing whitespace. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273357 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 01:23:51 +00:00
Eric Fiselier
14fe08bcb7 Avoid huge main() functions and huge arrays. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273354 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 01:13:44 +00:00