Commit Graph

1128 Commits

Author SHA1 Message Date
Marshall Clow e5f1288fa0 Implement LWG#2353: std::next is over-constrained
llvm-svn: 252407
2015-11-07 17:48:49 +00:00
Marshall Clow 8be59af1ed More of P0006R0: type traits variable aliases for C++17.
llvm-svn: 252406
2015-11-07 17:44:36 +00:00
Evgeniy Stepanov 65da7bc392 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.

llvm-svn: 252350
2015-11-06 22:02:29 +00:00
Marshall Clow 2cd0d6d625 Implement P0092R1 for C++1z
llvm-svn: 252195
2015-11-05 19:33:59 +00:00
Marshall Clow 79dfd99d30 Remove undefined behavior from some tests. Same pattern as the unitialized_copy tests
llvm-svn: 251804
2015-11-02 15:29:13 +00:00
Marshall Clow 8eb1d544f8 Remove undefined behavior from some tests. Thanks to Walter Brown for the heads-up.
llvm-svn: 251802
2015-11-02 15:25:53 +00:00
Marshall Clow 6028c03976 Add 'nostdinc++' to the flags used by testit. Makes the tests run better on Mac OS X with the new depr.c headers change
llvm-svn: 251768
2015-11-01 21:14:22 +00:00
Marshall Clow 00ec0bf828 Improve the tests for 'is_literal_type'
llvm-svn: 251767
2015-11-01 21:13:10 +00:00
Marshall Clow dd0ef09954 Implement the first part of P0006R0: Adopt Type Traits Variable Templates for C++17. Significantly augment the existing tests.
llvm-svn: 251766
2015-11-01 20:24:59 +00:00
Marshall Clow 131733bcf0 Implement P0004R1 'Remove Deprecated iostreams aliases'
llvm-svn: 251618
2015-10-29 05:43:30 +00:00
Matthias Braun cb668426c1 Adapt to lit change in llvm r251478-r251481
Sorry for the breakage.

llvm-svn: 251529
2015-10-28 17:20:33 +00:00
Eric Fiselier 4630f63a64 Fix test suite configuration. Sorry Marshall
llvm-svn: 251334
2015-10-26 19:08:53 +00:00
Marshall Clow 3b72a6ef63 Fix LWG#2489: mem_fn() should be noexcept
llvm-svn: 251257
2015-10-25 20:12:16 +00:00
Marshall Clow 531c41e1b8 Add the tests for the last commit
llvm-svn: 251254
2015-10-25 19:53:29 +00:00
Marshall Clow b631c24359 Add a test for LWG#2466: allocator_traits::max_size() default behavior is incorrect
llvm-svn: 251252
2015-10-25 19:34:04 +00:00
Marshall Clow d9977010d0 Add a test for LWG#2462: std::ios_base::failure is overspecified
llvm-svn: 251250
2015-10-25 19:20:14 +00:00
Marshall Clow 2603b0758d Fix LWG#2127: Move-construction with raw_storage_iterator.
llvm-svn: 251247
2015-10-25 18:58:07 +00:00
Marshall Clow 9be5356452 Fix LWG#2244: basic_istream::seekg
llvm-svn: 251246
2015-10-25 18:31:51 +00:00
Tim Northover a745ddd9a7 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.

llvm-svn: 251131
2015-10-23 17:56:08 +00:00
Eric Fiselier 8241405ad4 [libcxx] Make it drastically simpler to link libc++.
Summary:
Currently on most platforms you have to manually link the c++ abi library used with libc++ whenever you use libc++. So your typical libc++ command like invocation might look like:

```
clang++ -stdlib=libc++ foo.cpp -lc++abi
```

Having to manually link `libc++abi.so` makes it harder for libc++ to be used generically. This patch fixes that by generating a linker script for `libc++.so` that correctly links the ABI library. On linux the linker script for libc++abi would look like:

```
# libc++.so
INPUT(libc++.so.1 -lc++abi)
```

With the linker script you can now use libc++ using only `-stdlib=libc++`. This is the technique that is used on FreeBSD in ordered to link cxxrt and I think it's the best approach to make our users lives simpler.

The CMake option used to enable this is `LIBCXX_ENABLE_ABI_LINKER_SCRIPT`. In future I would like to enable this by default on all platforms except for Darwin.

Reviewers: mclow.lists, danalbert, rsmith, jroelofs, EricWF

Subscribers: cfe-commits

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

llvm-svn: 250319
2015-10-14 19:54:03 +00:00
Eric Fiselier f71de32d7b Split out config_site logic so libc++abi can use it
llvm-svn: 250312
2015-10-14 19:00:35 +00:00
Eric Fiselier 0a534eec65 [libcxx] Use __config_site to configure the test suite features.
Summary:
This patch changes the tests to use the "__config_site" header if present instead of manually configuring for each option. This patch also removes the test flags for configuring some of these options. For example "lit -sv --param=enable_threads=OFF" no longer works. However lit will still correctly configure if  the CMake option "-DLIBCXX_ENABLE_THREADS=OFF" is given at build time. 

This patch will fix the libc++abi test configuration for `LIBCXX_ABI_VERSION` and `LIBCXX_ABI_UNSTABLE` one we teach it about 'project_obj_dir' . I would like to land this ASAP to prevent more work blockage.

Reviewers: mclow.lists, danalbert, eugenis, ed, jroelofs

Subscribers: cfe-commits

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

llvm-svn: 250308
2015-10-14 18:22:15 +00:00
Eric Fiselier 29ada6d178 Use __config_site when building libc++. Also cleanup ABI versioning doc
llvm-svn: 250261
2015-10-14 00:22:05 +00:00
Evgeniy Stepanov a66a7b30ce ABI versioning macros for libc++.
C++ macros and CMake options that specify the default ABI version of
the library, and can be overridden to pick up new ABI-changing
features.

llvm-svn: 250254
2015-10-13 23:48:28 +00:00
Richard Smith f157e47fb8 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.

llvm-svn: 250247
2015-10-13 23:12:22 +00:00
Chris Bieneman 7c6a3b4c47 [Darwin] Reworking r250003 to use lit.util.capture instead of subprocess.
llvm-svn: 250007
2015-10-12 02:54:30 +00:00
Chris Bieneman e99983b2df [Darwin] Need to add -isysroot on OS X otherwise the tests will fail if you don't have the command line tools package installed.
This mirrors how other LLVM suites are configured for running on OS X.

llvm-svn: 250003
2015-10-12 00:49:56 +00:00
Eric Fiselier d2a4553d52 Revert r249931 - Remove same_decls.pass.cpp because it fails on OS X and in C++03 mode.
llvm-svn: 249938
2015-10-10 03:31:23 +00:00
Eric Fiselier 448dd41588 Get some of wchar_h.pass.cpp working on apple.
llvm-svn: 249936
2015-10-10 02:54:41 +00:00
Richard Smith 0ecae015ff Unrevert r249889, and XFAIL the test for Darwin, where the libc apparently doesn't provide a correct overload set for some functions.
llvm-svn: 249932
2015-10-10 01:39:51 +00:00
Richard Smith 3cfee3d010 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.

llvm-svn: 249931
2015-10-10 01:33:17 +00:00
Manman Ren 79d8bc4c88 Revert r249889 due to bot failure.
llvm-svn: 249926
2015-10-10 01:03:55 +00:00
Richard Smith 897758d6ba Split <wchar.h> out of <cwchar>.
llvm-svn: 249889
2015-10-09 19:56:37 +00:00
Richard Smith a51c8eee6e Split <stdlib.h> out of <cstdlib>.
llvm-svn: 249800
2015-10-09 01:41:45 +00:00
Richard Smith d32827408e Split <stdio.h> out of <cstdio>.
As with <stddef.h>, skip our custom header if __need_FILE or __need___FILE is defined.

llvm-svn: 249798
2015-10-09 01:29:09 +00:00
Richard Smith 55a7a2481b Fix test failure in C++98 mode due to imperfect static_assert emulation.
llvm-svn: 249780
2015-10-08 23:44:26 +00:00
Richard Smith d6cffc4fe0 Split <stddef.h> out of <cstddef>.
There are a bunch of macros (__need_size_t etc) that request just one piece of
<stddef.h>; if any one of these is defined, we just directly include the
underlying header.

Note that <stddef.h> provides a ::nullptr_t. We don't want that available to
includers of <cstddef>, so instead of following the usual pattern where <cfoo>
includes <foo.h> then pulls things from :: into std:: with using-declarations,
we implement <stddef.h> and <cstddef> separately; both include <__nullptr> for
the definition of std::nullptr_t.

llvm-svn: 249761
2015-10-08 22:25:27 +00:00
Richard Smith 38a2a28ff7 Split <setjmp.h> out of <csetjmp>.
llvm-svn: 249743
2015-10-08 20:41:26 +00:00
Richard Smith 524956bb3d Split <math.h> out of <cmath>.
llvm-svn: 249742
2015-10-08 20:40:34 +00:00
Richard Smith 37df7a05c2 Split <inttypes.h> out of <cinttypes>.
llvm-svn: 249741
2015-10-08 20:38:53 +00:00
Richard Smith f80c1b7331 Split <ctype.h> out of <cctype>.
llvm-svn: 249738
2015-10-08 20:36:30 +00:00
Marshall Clow 2a7b00e166 While researching LWG#2244, I noticed we weren't testing that eofbit was being cleared. Now we are
llvm-svn: 249593
2015-10-07 19:41:24 +00:00
Marshall Clow 05e9cb5636 Our test allocators support move/copy construction; they should support move/copy assignment as well
llvm-svn: 249458
2015-10-06 20:30:56 +00:00
Marshall Clow e652e4dae1 Fixed a possible overflow in a test of allocator::max_size().
llvm-svn: 249349
2015-10-05 20:50:25 +00:00
Marshall Clow 8428a9d5b6 Implement LWG#2063, and update the issues links to point to the github generated pages
llvm-svn: 249325
2015-10-05 16:17:34 +00:00
Eric Fiselier ca95c286f0 [libcxx] Use newest supported language dialect when running the test suite.
Summary:
Currently the test suite defaults to C++11 mode if no standard version is supplied to LIT using `--param=std=c++XX`.  This patch changes that behavior so that the newest possible dialect is selected instead.

I have already patched the C++11 bot to explicitly specify `--param=std=c++11`. I'm just putting this up for review to see if anybody objects to this idea.

Reviewers: mclow.lists, jroelofs, danalbert

Subscribers: cfe-commits

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

llvm-svn: 249226
2015-10-03 02:32:23 +00:00
Eric Fiselier 7362982e62 Attempt to prevent flaky thread.mutex tests by once again increasing timing tolerances
llvm-svn: 248993
2015-10-01 08:34:37 +00:00
Eric Fiselier d866bdd692 Manually suppress -Wnonnull when it occurs in an unevaluated context
llvm-svn: 248989
2015-10-01 07:41:07 +00:00
Eric Fiselier b4e2e7a292 Suppress array initialization warnings in std::experimental::apply tests
llvm-svn: 248987
2015-10-01 07:05:38 +00:00
Eric Fiselier f74bb3b8b0 Dont link -lrt in the testsuite on linux unless using sanitizers.
llvm-svn: 248986
2015-10-01 06:15:26 +00:00