2327 Commits

Author SHA1 Message Date
Marshall Clow
eefcf8206e Remove undefined behavior from tests; specifically, ensure that the value type of the allocators match the value type of the containers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254030 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 22:10:51 +00:00
Vasileios Kalintiris
5e00a713ed Use libcxx's default rune table with the Musl C library.
Summary:
Also, there are no exported character type tables from Musl so we have to
Fallback to the standard functions. This reduces the number of libcxx's
test-suite failures down to ~130 for MIPS. Most of the remaining failures
come from the atomics (due to the lack of 8-byte atomic-ops in MIPS32) and
thread tests.

Reviewers: mclow.lists, EricWF, dalias, jroelofs

Subscribers: tberghammer, danalbert, srhines, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@253972 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 10:24:54 +00:00
Marshall Clow
a660757c72 Fix some mistakes in the <utility> and <tuple> synopses. No functional change. Thannks to K-ballo for the patch
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@253593 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 19:45:29 +00:00
Marshall Clow
d8717289a6 Fix some mistakes in the <array> synopsis. No functional change. Thanks to K-ballo for the patch
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@253592 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 19:41:04 +00:00
Eric Fiselier
55dbcdab7f Fix bad variable name. project_root -> project_obj_root
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@253382 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 21:48:29 +00:00
Marshall Clow
99b6e56ae9 Add tests for the extended integer types - as required by LWG#2119
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@253376 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 21:04:24 +00:00
Marshall Clow
f60d092766 Implement P0007: Constant View: A proposal for a std::as_const helper function template.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@253274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 00:08:08 +00:00
Marshall Clow
ffc9c61015 Fix compile error in test. Can't use operator[] for multimap.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@253271 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-16 23:40:27 +00:00
Marshall Clow
15a326c525 More tests for LWG#2156
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@253257 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-16 22:18:36 +00:00
Marshall Clow
7b7c9ec355 LWG#2156 loosened the requirements on unordered containers 'rehash' calls. Add tests to make sure we meet these requirements. Since we met the stricter ones, no code change needed to meet the looser ones.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@253223 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-16 16:42:16 +00:00
Marshall Clow
fe99a30bd0 Implement P0013R1: Logical Operator Type Traits. Make a hidden implementation (__and_, __or_, and __not_) so that we can use them elsewhere in non-C++17 code - for example, in the LFTS
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@253215 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-16 15:54:13 +00:00
Marshall Clow
98984f23c6 Mark P0013 as 'in progress'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@253212 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-16 15:05:09 +00:00
Marshall Clow
3f159e874c Implement P0074: Making owner_less more flexible
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252905 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-12 15:56:44 +00:00
Asiri Rathnayake
94d9b1c5b2 [libcxx] Fixup a few fumbles in the initial no-exceptions XFAILs list.
The initial buildbot run found a few missing bits in the initial XFAIL list
for the no-exceptions libc++ variant. These discrepancies are as follows:

[1] Following two tests need XFAILs on the no-exceptions library variant.
My local runs had these two disabled for other reasons (unsupported):

  - localization/locales/locale/locale.cons/char_pointer.pass.cpp
  - numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp

[2] These three does not need XFAILs, they were failing on my local runs for
other reasons:

  - depr/depr.c.headers/uchar_h.pass.cpp
  - input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
  - .../category.collate/locale.collate.byname/transform.pass.cpp

(these are failing on my box for the default build as well)

The current patch fixes both the cases above. Additionally, I've run the
following scan to make sure I've covered all the cases:

> grep ' catch \| try \| throw ' -R . | perl -pe 's|(.*?):.*|\1|' | sort | \
  uniq > 1.txt
> grep 'libcpp-no-exceptions' -R . | perl -pe 's|(.*?):.*|\1|' | sort | \
  uniq > 2.txt
> diff 1.txt 2.txt

This showed up a few extra interesting cases:

[3] These two tests do not use try/catch/throw statements, but they fail at
runtime. Need to be investigated, I've left the XFAILs in.

  - std/thread/futures/futures.shared_future/dtor.pass.cpp
  - std/thread/futures/futures.unique_future/dtor.pass.cpp

[4] These tests use a macro named TEST_HAS_NO_EXCEPTIONS to conditionally
exclude try/catch/throw statements when running without exceptions. I'm not
entirely sure why this was needed (AFAIK, we didn't have a no-exceptions
library build before). The macro's defintion is quite similar to that of
_LIBCPP_NO_EXCEPTIONS. I will investigate if this can be reused for my test
fixes or if it should be replaced with _LIBCPP_NO_EXCEPTIONS.

  - std/experimental/any/*

Change-Id: I9ad1e0edd78f305406eaa0ab148b1ab693f7e26a

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252870 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-12 10:41:57 +00:00
Marshall Clow
e1c5c419f5 Fix typo I just introduced.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252614 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10 16:10:17 +00:00
Marshall Clow
1bae7a868b std:: qualify ptrdiff_t in the test. Thanks to Walter for the catch
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252613 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10 16:04:13 +00:00
Marshall Clow
55d741c32e Walter pointed out some missing includes in the tests. Fixing the includes uncovered a couple bugs in the _v type traits. Fixed those, too
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252612 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10 15:48:23 +00:00
Marshall Clow
a28344c08b Explicitly #include <utility> so that we get std::move. Thanks to Walter for the bug report.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252610 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10 15:22:08 +00:00
Asiri Rathnayake
cc2e93cff0 Make it possible to build a no-exceptions variant of libcxx.
Fixes a small omission in libcxx that prevents libcxx being built when
-DLIBCXX_ENABLE_EXCEPTIONS=0 is specified.

This patch adds XFAILS to all those tests that are currently failing
on the new -fno-exceptions library variant. Follow-up patches will
update the tests (progressively) to cope with the new library variant.

Change-Id: I4b801bd8d8e4fe7193df9e55f39f1f393a8ba81a

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252598 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10 11:41:22 +00:00
Marshall Clow
6b6407a6db Mark LWG#2486 as complete. Eric did this as part of r242959
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252509 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 20:49:15 +00:00
NAKAMURA Takumi
84bdf2cbe4 Make check-libcxx Py3-compatible.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252458 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 10:55:04 +00:00
Vasileios Kalintiris
579b42b413 Add initial support for the MUSL C library.
Summary:
This patch adds the LIBCXX_LIBC_IS_MUSL cmake option to allow the
building of libcxx with the Musl C library. The option is necessary as
Musl does not provide any predefined macro in order to test for its
presence, like GLIBC. Most of the changes specify the correct path to
choose through the various #if/#else constructs in the locale code.

Depends on D13407.

Reviewers: mclow.lists, jroelofs, EricWF

Subscribers: jfb, tberghammer, danalbert, srhines, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252457 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 10:21:04 +00:00
Marshall Clow
fa62fbe63f Mark LWG#2224 as complete. Wording change only, no code changes required
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252408 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 17:56:51 +00:00
Marshall Clow
e9ef988b08 Implement LWG#2353: std::next is over-constrained
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252407 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 17:48:49 +00:00
Marshall Clow
6455d85714 More of P0006R0: type traits variable aliases for C++17.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252406 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 17:44:36 +00:00
Evgeniy Stepanov
a3b25f81d1 Cleanup: move visibility/linkage attributes to the first declaration.
This change moves visibility attributes from out-of-class method
definitions to in-class declaration. This is needed for a switch to
attribute((internal_linkage)) (see http://reviews.llvm.org/D13925)
which can only appear on the first declaration.

This change does not touch istream/ostream/streambuf. They are
handled separately in http://reviews.llvm.org/D14409.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252385 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 01:22:13 +00:00
Evgeniy Stepanov
746572b91d Allow deque to handle incomplete types.
Allow deque and deque::iterator instantiation with incomplete element
type. This is an ABI breaking change, and it is only enabled if
LIBCXX_ABI_VERSION >= 2 or LIBCXX_ABI_UNSTABLE=ON.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252350 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-06 22:02:29 +00:00
Eric Fiselier
38e7a30143 Cleanup foo.h headers and __config to work in C
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-06 06:30:12 +00:00
Marshall Clow
970a9e5866 Mark LWG issue #2234. We already do this; no code change needed
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252199 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 19:57:50 +00:00
Marshall Clow
223df2ef0f Implement P0092R1 for C++1z
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252195 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 19:33:59 +00:00
Marshall Clow
c010bd6289 Make reverse() call iter_swap like the standard says, instead of calling swap directly. No real change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251836 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 21:34:25 +00:00
Marshall Clow
25bcb0a5a9 Remove undefined behavior from some tests. Same pattern as the unitialized_copy tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251804 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 15:29:13 +00:00
Marshall Clow
48bcd27b67 Remove undefined behavior from some tests. Thanks to Walter Brown for the heads-up.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251802 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 15:25:53 +00:00
Marshall Clow
59b5ea57c3 Add 'nostdinc++' to the flags used by testit. Makes the tests run better on Mac OS X with the new depr.c headers change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251768 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-01 21:14:22 +00:00
Marshall Clow
fe11cfdd65 Improve the tests for 'is_literal_type'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251767 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-01 21:13:10 +00:00
Marshall Clow
94611a888b Implement the first part of P0006R0: Adopt Type Traits Variable Templates for C++17. Significantly augment the existing tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251766 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-01 20:24:59 +00:00
Richard Smith
9d6ca4962b Revert r249929 ("Split <string.h> out of <cstring>").
This change caused problems when building code like povray that:
a) uses 'using namespace std;'
b) is built on an environment where the C library provides the "wrong"
   (non-const-correct) interface for the str* functions
c) makes an unqualified call to one of those str* functions

A patch is out for review to add a facility to fix this (and to give the
correct signatures for these functions whenever possible, even when the C
library does not do so). This revert is expected to be temporary.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251665 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 23:32:29 +00:00
Marshall Clow
8aadda9a19 Implement P0004R1 'Remove Deprecated iostreams aliases'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251618 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 05:43:30 +00:00
Marshall Clow
0cff2318f5 Mark two Kona papers as 'in progress'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251545 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 19:21:40 +00:00
Matthias Braun
1f98e313a1 Adapt to lit change in llvm r251478-r251481
Sorry for the breakage.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251529 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 17:20:33 +00:00
Eric Fiselier
dd2fe4de1d Fix test suite configuration. Sorry Marshall
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251334 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 19:08:53 +00:00
Marshall Clow
28ce1c847a Mark LWG#2495 as complete. No code changes needed
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251258 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 20:12:58 +00:00
Marshall Clow
fb7b97cfbb Fix LWG#2489: mem_fn() should be noexcept
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251257 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 20:12:16 +00:00
Marshall Clow
8997b87133 Add the tests for the last commit
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251254 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:53:29 +00:00
Marshall Clow
9533a4a80f Fix LWG#2476: scoped_allocator_adaptor is not assignable
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251253 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:52:47 +00:00
Marshall Clow
88fa03a06e Add a test for LWG#2466: allocator_traits::max_size() default behavior is incorrect
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251252 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:34:04 +00:00
Marshall Clow
175cb20bfb Add a test for LWG#2462: std::ios_base::failure is overspecified
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251250 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:20:14 +00:00
Marshall Clow
332ab91947 Fix LWG#2127: Move-construction with raw_storage_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251247 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 18:58:07 +00:00
Marshall Clow
dbef2bb1d0 Fix LWG#2244: basic_istream::seekg
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251246 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 18:31:51 +00:00
Marshall Clow
fd33deb083 Update C++ status from Kona
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251220 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 06:02:23 +00:00