269 Commits

Author SHA1 Message Date
Eric Fiselier
9a6a9c08e4 Fix type in tuple test. Sorry for the noise
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@255944 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 01:04:36 +00:00
Eric Fiselier
199bee0ea7 [libcxx] LWG2485: get() should be overloaded for const tuple&&. Patch from K-Ballo.
Review: http://reviews.llvm.org/D14839

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@255941 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 00:36:55 +00:00
Eric Fiselier
e39f4b996e Fix various GCC mis-configurations for newer versions.
This patch goes through and enables C++11 and C++14 features for newer GCC's.
The main changes are:

1. Turn on variable templates. (Uses __cpp_variable_templates)
2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501).
3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404)
4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@255585 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-15 00:32:21 +00:00
Marshall Clow
90e328c271 K-Ballo pointed out a mistake in the add_lvalue_ref tests I checked in; now more of them are passing. Thanks
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@255519 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-14 18:11:51 +00:00
Marshall Clow
b6621c5259 Fix a corner case that involved calling rethrow_if_nested with a type that had a deleted operator&. Added a test to catch this as well. Thanks to Ville for the heads-up.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@255517 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-14 18:01:56 +00:00
Marshall Clow
633fe505fe Add add_lvalue_ref tests for a few function types, with a note why not more
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@255513 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-14 17:34:03 +00:00
Eric Fiselier
76d2446cf4 Use __make_integer_seq builtin for std::make_integer_sequence. Patch by K-ballo.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@255162 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 22:03:06 +00:00
Marshall Clow
a3866e4c89 Last bit of P0006; mark it as complete
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254290 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 05:39:30 +00:00
Marshall Clow
ea972908a3 Fix bugs in alignment_of_v, etc. Re-enable the newly added tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254289 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 05:20:00 +00:00
Marshall Clow
c180f34dd3 Temporarily disable new tests while I figure out what's going on
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254288 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 05:15:10 +00:00
Marshall Clow
5c2fabf7f7 Fix bad macros
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254287 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 05:10:10 +00:00
Marshall Clow
8254964ef0 Implement more of P0006; Type Traits Variable Templates. <ratio>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254285 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 05:04:22 +00:00
Marshall Clow
b5599c682f Fix bad macros in tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254284 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 05:03:35 +00:00
Marshall Clow
a3e7f528a2 Implement more of P0006; Type Traits Variable Templates.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254283 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 04:30:02 +00:00
Marshall Clow
14ba0ad689 Add static_assert to set/multiset/map/multimap/forward_list/deque that the allocator's value_type match the container's value_type. vector/unordered/list/string already do this. Add tests for all the containers to verify this.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254119 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 01:24:04 +00:00
Marshall Clow
5a579cfea4 Silence a -Wmissing-braces warning in the tests; mbstate_t is defined differently on different C libraries.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254050 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-25 01:06:36 +00:00
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
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
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
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
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
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
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
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
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
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
Tim Northover
25037cf729 Set LC_COLLATE rather than LANG to override collation.
On a system with LC_COLLATE=C, this takes precedence over a non-C LANG
the test tries to impose and the test fails.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251131 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-23 17:56:08 +00:00
Richard Smith
b3b00818e5 Fix use of libc++ <foo.h> headers from within an 'extern "C"' context in C++98.
Previously, this resulted in us declaring a template for static_assert emulation within the 'extern "C"' context, which is ill-formed.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250247 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-13 23:12:22 +00:00
Eric Fiselier
42b89c7e05 Revert r249931 - Remove same_decls.pass.cpp because it fails on OS X and in C++03 mode.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@249938 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-10 03:31:23 +00:00
Eric Fiselier
ea33904773 Get some of wchar_h.pass.cpp working on apple.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@249936 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-10 02:54:41 +00:00
Richard Smith
de66c515de Unrevert r249889, and XFAIL the test for Darwin, where the libc apparently doesn't provide a correct overload set for some functions.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@249932 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-10 01:39:51 +00:00
Richard Smith
8b7a6b8995 Add a test that we declare the right set of C library function signatures in ::
and std::, and that the names in :: and std:: are declaring the same entity.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@249931 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-10 01:33:17 +00:00