Commit Graph

2267 Commits

Author SHA1 Message Date
Brian Cain 086b6682dd XFAIL tests on SLES11
XFAIL some failing tests for SLES11 (older glibc), also replace spaces
in linux distro w/dashes.

llvm-svn: 312774
2017-09-08 03:57:02 +00:00
Marshall Clow 064028bb05 Add even more string_view tests. These found some bugs in the default parameter value for rfind/find_last_of/find_last_not_of
llvm-svn: 312693
2017-09-07 04:19:32 +00:00
Marshall Clow e2addb79b8 Another missing string_view test
llvm-svn: 312691
2017-09-07 03:03:48 +00:00
Marshall Clow b6d73126c8 Add more string_view tests
llvm-svn: 312690
2017-09-07 02:46:09 +00:00
Casey Carter e38efe12da [test] Cleanup nullopt_t tests
* Update specification text from N4387

* Delete not_brace_initializable.fail.cpp: it's redundant with nullopt_t.fail.cpp

* is_empty<T> implies is_class<T>

* is_literal is deprecated; directly verify that we can create a nullopt_t in a constexpr context

Differential Revision: D37024

llvm-svn: 312256
2017-08-31 17:56:31 +00:00
Marshall Clow 589453458d Fix test for C++03
llvm-svn: 311967
2017-08-29 01:10:51 +00:00
Marshall Clow a763b36ff4 Fix PR31166: std::inplace_merge seems to be unstable. Thanks to Jan Wilken Dörrie for the suggested fix.
llvm-svn: 311952
2017-08-28 23:16:13 +00:00
Stephan T. Lavavej bc933768a6 [libcxx] [test] Update for C++17 feature removals.
test/std/containers/Emplaceable.h
test/std/containers/NotConstructible.h
test/support/counting_predicates.hpp
Replace unary_function/binary_function inheritance with typedefs.

test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp
test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp
test/std/utilities/function.objects/func.require/binary_function.pass.cpp
test/std/utilities/function.objects/func.require/unary_function.pass.cpp
Mark these tests as requiring 98/03/11/14 because 17 removed unary_function/binary_function.

test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp
test/std/thread/futures/futures.task/futures.task.nonmembers/uses_allocator.pass.cpp
Mark these tests as requiring 11/14 because 17 removed packaged_task allocator support.

test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp
This test doesn't need to be skipped in C++17 mode. Only the construction of
std::function from an allocator needs to be skipped in C++17 mode.

test/std/utilities/function.objects/refwrap/refwrap.access/conversion.pass.cpp
test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp
test/std/utilities/function.objects/refwrap/refwrap.const/copy_ctor.pass.cpp
test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp
When testing these reference_wrapper features, unary_function inheritance is totally irrelevant.

test/std/utilities/function.objects/refwrap/weak_result.pass.cpp
Define and use my_unary_function/my_binary_function to test the weak result type machinery
(which is still present in C++17, although deprecated).

test/support/msvc_stdlib_force_include.hpp
Now we can test C++17 strictly, without enabling removed features.

Fixes D36503.

llvm-svn: 311705
2017-08-24 21:24:08 +00:00
Stephan T. Lavavej 709be5eef2 [libcxx] [test] Rename _Up to U, etc. NFCI.
This improves readability and (theoretically) improves portability,
as _Ugly names are reserved.

This performs additional de-uglification, so all of these tests
follow the example of iterator.traits/empty.pass.cpp.

llvm-svn: 310761
2017-08-11 20:54:09 +00:00
Stephan T. Lavavej ed76ab3f1c [libcxx] [test] Rename __x to x. NFCI.
This improves readability and (theoretically) improves portability,
as __ugly names are reserved.

llvm-svn: 310760
2017-08-11 20:54:06 +00:00
Stephan T. Lavavej 55467c4685 [libcxx] [test] Rename __c to ch. NFCI.
This improves readability and (theoretically) improves portability,
as __ugly names are reserved.

llvm-svn: 310759
2017-08-11 20:54:01 +00:00
Stephan T. Lavavej aae63566dc [libcxx] [test] Rename _Tp to T. NFCI.
This improves readability and (theoretically) improves portability,
as _Ugly names are reserved.

llvm-svn: 310758
2017-08-11 20:53:53 +00:00
Stephan T. Lavavej c099010ed7 [libcxx] [test] Untabify stringstream.cons/string.pass.cpp. NFC.
llvm-svn: 310157
2017-08-05 00:44:27 +00:00
Stephan T. Lavavej ade32237dc [libcxx] [test] Fix URLs in comments and make them HTTPS. NFC.
llvm-svn: 310156
2017-08-05 00:44:24 +00:00
Stephan T. Lavavej e71235b438 [libcxx] [test] Consistently list "c++98, c++03" in chronological order. NFC.
llvm-svn: 310155
2017-08-05 00:44:19 +00:00
Marshall Clow 4f4fc2ea7b Fix shadowing warning
llvm-svn: 309851
2017-08-02 18:21:34 +00:00
Marshall Clow a054f828dd Fix PR33727: std::basic_stringbuf only works with DefaultConstructible allocators. Thanks to Jonathan Wakely for the report and suggested fix
llvm-svn: 309838
2017-08-02 17:31:09 +00:00
Eric Fiselier 6301546b3d Mark LWG 2942 as complete
llvm-svn: 309528
2017-07-30 22:28:08 +00:00
Stephan T. Lavavej 9ea675ef8c [libcxx] [test] Change comments to say C++ instead of c++. NFC.
This makes them consistent (many comments already used uppercase).

The special REQUIRES, UNSUPPORTED, and XFAIL comments are excluded from this change.

llvm-svn: 309468
2017-07-29 00:55:35 +00:00
Stephan T. Lavavej ca15aa1b70 [libcxx] [test] The entire file futures.shared_future/wait_until.pass.cpp was indented by 1 space. NFC.
llvm-svn: 309467
2017-07-29 00:55:27 +00:00
Stephan T. Lavavej 05f99df8e2 [libcxx] [test] In func.wrap.func.con/alloc_F.pass.cpp, fix REQUIRES whitespace. NFC.
llvm-svn: 309466
2017-07-29 00:55:25 +00:00
Stephan T. Lavavej d29b12ef7c [libcxx] [test] Make files consistently end with newlines, NFC.
llvm-svn: 309465
2017-07-29 00:55:22 +00:00
Stephan T. Lavavej 4159db7698 [libcxx] [test] Untabify, NFC.
llvm-svn: 309464
2017-07-29 00:55:10 +00:00
Stephan T. Lavavej 8980b8ad9c [libcxx] [test] Strip trailing whitespace, NFC.
llvm-svn: 309463
2017-07-29 00:54:49 +00:00
Stephan T. Lavavej f85e2e218a [libcxx] [test] Remove an unused local typedef in enable_shared_from_this.pass.cpp.
Trivial change, committed without review.

llvm-svn: 309322
2017-07-27 21:16:37 +00:00
Marshall Clow 4d82e40310 Disable the deduction guide test I added in 309296 for the moment, while I figure out which compilers don't support deduction guides
llvm-svn: 309307
2017-07-27 18:47:35 +00:00
Marshall Clow 88c893cc33 Implement P0739R0: 'Some improvements to class template argument deduction integration into the standard library' This is an API change (not ABI change) due to a late change in the c++17 standard
llvm-svn: 309296
2017-07-27 17:44:03 +00:00
Rachel Craik 3e2ef40812 Remove addtional parameters in function std::next() and std::prev()
Creating a function pointer with proper parameters pointing to std::next() or std::prev() should work.
This change moves the invented paramater for enable_if over to the return type to resolve this QoI issue.

Patch by Jason Liu.

Differential Revision: https://reviews.llvm.org/D34649

llvm-svn: 308932
2017-07-24 22:17:05 +00:00
Stephan T. Lavavej 9587bcfd79 [libcxx] [test] Update msvc_stdlib_force_include.hpp.
MSVC's STL is replacing _HAS_FUNCTION_ASSIGN with _HAS_FUNCTION_ALLOCATOR_SUPPORT,
and is adding _HAS_UNEXPECTED.

llvm-svn: 308535
2017-07-19 22:02:33 +00:00
Stephan T. Lavavej b1ba797d0d [libcxx] [test] Fix Clang -Wunused-local-typedef warnings.
Fix D34536.

llvm-svn: 308534
2017-07-19 22:02:29 +00:00
Stephan T. Lavavej 73f9077721 [libcxx] [test] Fix MSVC warning C4067 "unexpected tokens following preprocessor directive - expected a newline".
Also fixes Clang/LLVM 4.0 (for Windows) error "function-like macro 'TEST_GLIBC_PREREQ' is not defined".

Fixes D34535.

llvm-svn: 308533
2017-07-19 22:02:25 +00:00
Stephan T. Lavavej 14e60beb71 [libcxx] [test] Fix MSVC warning C4242 "conversion from 'int' to 'const char', possible loss of data".
Fixes D34534.

llvm-svn: 308532
2017-07-19 22:02:22 +00:00
Marshall Clow 33116350ad Add case for c++2a to libc++ and test macros
llvm-svn: 308159
2017-07-17 03:02:27 +00:00
Eric Fiselier 766233b153 Fix issues with UBSAN test configuration.
On Apple the test feature 'sanitizer-new-delete' was incorrectly
getting added to the LIT feature set, which mistakenly caused tests
to be disabled when using UBSAN (the feature is only needed with ASAN/MSAN/TSAN).

llvm-svn: 307518
2017-07-10 04:32:21 +00:00
Eric Fiselier cc859306f4 Work around PR31864 - ATOMIC_LLONG_LOCK_FREE is incorrect in 32 bit builds
llvm-svn: 307517
2017-07-10 04:16:50 +00:00
Eric Fiselier 52f2683695 Fix test failure to to new/delete ellisions
llvm-svn: 307510
2017-07-09 22:20:07 +00:00
Casey Carter f2d571c8ac optional: Implement LWG 2900 and P0602
Differential Revision: https://reviews.llvm.org/D32385

llvm-svn: 307505
2017-07-09 17:15:49 +00:00
Eric Fiselier 433c2f0859 Fix filesystem build on platforms with weird time_t types.
32-bit powerpc provides a 64 bit time_t type and older ppc64 systems
provide time_t as a floating point type. This caused problems when building
operations.cpp since operations.cpp contained compile time tests for conversions
between time_t and filesystem time type.

When these tests failed they caused the libc++ build to fail as well. This is unfortunate.

This patch moves the tests out of the source file and into the test suite. It also
expands the tests to allow testing of the weird time_t configurations on all platforms.

llvm-svn: 307461
2017-07-08 04:18:41 +00:00
Eric Fiselier f29a1b921c Fix diagnostic in verify test to match new Clang output
llvm-svn: 307450
2017-07-07 23:02:30 +00:00
Duncan P. N. Exon Smith 66631a12b8 cmath: Support clang's -fdelayed-template-parsing
r283051 added some functions to cmath (in namespace std) that have the
same name as functions in math.h (in the global namespace).  Clang's
limited support for `-fdelayed-template-parsing` chokes on this.  Rename
the ones in `cmath` and their uses in `complex` and the test.

rdar://problem/32848355

llvm-svn: 307357
2017-07-07 05:13:36 +00:00
Marshall Clow 52f4f72fa9 Fix a bug in regex_Iterator where it would report zero-length matches forever. Reported as http://llvm.org/PR33681. Thanks to Karen Arutyunov for the report.
llvm-svn: 307171
2017-07-05 16:37:19 +00:00
Eric Fiselier 57495596bd Fix equivalent test on OS X and FreeBSD
llvm-svn: 307119
2017-07-05 03:54:38 +00:00
Eric Fiselier 635430895a Add dummy CMake target for *.pass.cpp tests when LIBCXX_CONFIGURE_IDE=ON.
In order for IDE's like CLion to correctly parse and highlight the tests
it needs to know roughly how to build them. This patch adds a dummy CMake target
for each/all of the .pass.cpp tests in the test suite to solve this problem.
The target is only created when LIBCXX_CONFIGURE_IDE=ON, so it shouldn't affect
most users.

Originally I wasn't sure that this change deserved to live upstream, but it's
quite frustrating to edit libc++ tests using CLion or Visual Studio without it,
in particular the filesystem tests which rely heavily on macros. Even though the change
should have no effect on non-IDE users/configurations I decided to commit it upstream
with the hopes it will benefit somebody other than me.

llvm-svn: 307118
2017-07-05 03:50:03 +00:00
Eric Fiselier 459877388b Implement LWG 2937 - equivalent("dne", "exists") is not an error
This patch speculatively implements the PR for LWG 2937, which fixes
two issues with equivalent.

(1) It makes equivalent("dne", "exists") an error. Previously only
    equivalent("dne", "dne") was an error and the former case was not (it returned false).
    Now equivalent reports an error when either input doesn't exist.

(2) It makes equivalent(p1, p2) well-formed when `is_other(p1) && is_other(p2)`.
    Previously this was an error, but there is seemingly no reason why it should be on POSIX system.

llvm-svn: 307117
2017-07-05 03:37:05 +00:00
Akira Hatanaka 539cb66bea Revert "[libcxx] Annotate c++17 aligned new/delete operators with availability"
This reverts commit r306310.

r306310 causes clang to reject a call to an aligned allocation or
deallocation function if it is not implemented in the standard library
of the deployment target. This is not the desired behavior when users
have defined their own aligned functions.

rdar://problem/32664169

llvm-svn: 306859
2017-06-30 18:50:23 +00:00
Marshall Clow f8c16417a9 Added failing tests for index out of range for tuple_element<pair<T1,T2>> and variant_alternative<>
llvm-svn: 306580
2017-06-28 18:18:30 +00:00
Akira Hatanaka 393b55ffe2 [libcxx] Annotate c++17 aligned new/delete operators with availability
attribute.

This is needed because older versions of libc++ do not have these
operators. If users target an older deployment target and try to compile
programs in which these operators are explicitly called, the compiler
will complain.

The following is the list of minimum deployment targets for the four
OSes:

macosx: 10.13
ios: 11.0
tvos: 11.0
watchos: 4.0

rdar://problem/32664169

Differential Revision: https://reviews.llvm.org/D34556

llvm-svn: 306310
2017-06-26 17:39:48 +00:00
Marshall Clow ac8ea7c6ff Implement inclusive_scan/transform_inclusive_scan for C++17.
llvm-svn: 306083
2017-06-23 05:12:42 +00:00
Eric Fiselier 0509238077 Attempt to avoid static init ordering issues with globalMemCounter
llvm-svn: 305955
2017-06-21 21:42:50 +00:00
Stephan T. Lavavej 73f7f8df2b [libcxx] [test] Fix -Wmismatched-tags in tuple_size_structured_bindings.pass.cpp.
Clang and C1XX both complain about mismatched class/struct, but libc++ and MSVC's STL
differ on what they use for tuple_element/tuple_size, so there's no way to win here.

I'm reverting this part of my previous change. In the future, I'll have to suppress
the warning for one compiler or the other.

llvm-svn: 305854
2017-06-20 21:10:53 +00:00