Commit Graph

1143 Commits

Author SHA1 Message Date
Eric Fiselier 1f6e22d1cc Fix bad variable name. project_root -> project_obj_root
llvm-svn: 253382
2015-11-17 21:48:29 +00:00
Marshall Clow 1867554cc6 Add tests for the extended integer types - as required by LWG#2119
llvm-svn: 253376
2015-11-17 21:04:24 +00:00
Marshall Clow dbd2d32892 Implement P0007: Constant View: A proposal for a std::as_const helper function template.
llvm-svn: 253274
2015-11-17 00:08:08 +00:00
Marshall Clow 28ec78e7a5 Fix compile error in test. Can't use `operator[]` for multimap.
llvm-svn: 253271
2015-11-16 23:40:27 +00:00
Marshall Clow b90e350017 More tests for LWG#2156
llvm-svn: 253257
2015-11-16 22:18:36 +00:00
Marshall Clow a9197737f9 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.
llvm-svn: 253223
2015-11-16 16:42:16 +00:00
Marshall Clow dd1b261f3a 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
llvm-svn: 253215
2015-11-16 15:54:13 +00:00
Marshall Clow 183c010c9a Implement P0074: Making owner_less more flexible
llvm-svn: 252905
2015-11-12 15:56:44 +00:00
Asiri Rathnayake ea4282d336 [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
llvm-svn: 252870
2015-11-12 10:41:57 +00:00
Marshall Clow d1180f4abc Fix typo I just introduced.
llvm-svn: 252614
2015-11-10 16:10:17 +00:00
Marshall Clow 41277d179f std:: qualify ptrdiff_t in the test. Thanks to Walter for the catch
llvm-svn: 252613
2015-11-10 16:04:13 +00:00
Marshall Clow d17405fe9c Walter pointed out some missing includes in the tests. Fixing the includes uncovered a couple bugs in the _v type traits. Fixed those, too
llvm-svn: 252612
2015-11-10 15:48:23 +00:00
Marshall Clow bfba968360 Explicitly #include <utility> so that we get std::move. Thanks to Walter for the bug report.
llvm-svn: 252610
2015-11-10 15:22:08 +00:00
Asiri Rathnayake f520c1445f 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
llvm-svn: 252598
2015-11-10 11:41:22 +00:00
NAKAMURA Takumi 4c9c937542 Make check-libcxx Py3-compatible.
llvm-svn: 252458
2015-11-09 10:55:04 +00:00
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