Commit Graph

4246 Commits

Author SHA1 Message Date
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
Aditya Kumar 6c9ce223ea [NFC] remove trailing WS
llvm-svn: 311283
2017-08-20 10:38:55 +00:00
Joerg Sonnenberger 7e680f15a5 Spelling
llvm-svn: 311156
2017-08-18 12:57:36 +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
Marshall Clow 162484f7da Change the way the literal operators are defined - now w/o a seperating space. This should be a NFC, but it will change how the compiler parses it.
llvm-svn: 310487
2017-08-09 15:42:50 +00:00
Shoaib Meenai 9b8ef6e55a [libc++] Don't hardcode namespace in manual mangling
libc++'s inline namespace can change depending on the ABI version.
Instead of hardcoding __1 in the manual Microsoft ABI manglings for the
iostream globals, stringify _LIBCPP_NAMESPACE and use that instead, to
work across all ABI versions.

llvm-svn: 310290
2017-08-07 19:59:58 +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
Eric Fiselier fa259aa50f Fix libcxx build with glibc 2.26+ by removing xlocale.h include.
Patch by Khem Raj. Reviewed as D35697. Also see PR33729.

llvm-svn: 309920
2017-08-03 04:28:10 +00:00
Eric Fiselier 6e63d8fb82 Add system header pragma to BSD locale fallback headers.
This prevent leaking warnings to the user about use of C++11
extensions in C++03.

llvm-svn: 309917
2017-08-03 02:50:43 +00:00
Marshall Clow c9da8f0f64 Rename a couple variables to eliminate a shadow warning. No functionality change
llvm-svn: 309881
2017-08-02 20:29:26 +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
Eric Fiselier 1190335f9d Mark LWG 2961 as complete
llvm-svn: 309527
2017-07-30 22:16:30 +00:00
Shoaib Meenai 191b7d18f1 [libc++] Hoist extern template above first use
This function template is referenced inside class basic_string as a
friend function. The extern template declaration needs to be above that
friend declaration to actually take effect.

This is important because this function was marked as exported in
r307966, so without the extern template taking effect, it can leak into
other DSOs as a visible symbol.

llvm-svn: 309474
2017-07-29 02:54:41 +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
Marshall Clow e5cc2fcc90 make sure that we don't call basic_streambuf::gbump with a value bigger than INT_MAX, since it only takes an int. Related to, but not quite the same as PR33725
llvm-svn: 308880
2017-07-24 14:05:10 +00:00
Nico Weber 7fa845e713 Fix grammar-o in comment.
llvm-svn: 308827
2017-07-22 15:16:42 +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
James Y Knight 929f159777 Rework libcxx strerror_r handling.
The set of #ifdefs used to handle the two incompatible variants of
strerror_r were not complete (they didn't handle newlib appropriately).

Rather than attempting to make the ifdefs more complex, make them
unnecessary by choosing which behavior to use dependent upon the
return type.

Reviewers: waltl

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

llvm-svn: 308528
2017-07-19 21:48:49 +00:00
Hans Wennborg 9e82a506ae Update _LIBCPP_VERSION and the version in CMakeLists to 6.0
llvm-svn: 308468
2017-07-19 13:57:10 +00:00
Hans Wennborg dd2f4e0288 Bump docs version to 6.0
llvm-svn: 308462
2017-07-19 13:46:11 +00:00
Leo Li 95e45f9f93 [CMake] Use MATCHES for regular expression.
Subscribers: mgorny

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

llvm-svn: 308347
2017-07-18 19:48:02 +00:00
Bruno Cardoso Lopes e59dd00038 Check for _MSC_VER before defining _LIBCPP_MSVCRT
Some targets (e.g. Darwin) might have the Win32 API available, but they
do not use MSVC CRT. Assume _LIBCPP_MSVCRT only when _MSC_VER is available
and __MINGW32__ isn't defined.

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

rdar://problem/32628786

llvm-svn: 308225
2017-07-17 21:52:31 +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
Marshall Clow 5820ae49ab Update libc++ status pages with results of the Toronto Meeting - and for C++2a
llvm-svn: 308153
2017-07-16 23:59:23 +00:00
Marshall Clow d994e3f35d Update issues moved in Toronto
llvm-svn: 308097
2017-07-15 15:22:21 +00:00
Shoaib Meenai 316a3e572e [libc++] Clean up cl warning 4231 disabling
Once upon a time, extern templates used to be a Microsoft extension, so
cl would warn about their usage, and libc++ suppressed that warning.
They've long since been standardized, so the warning is defunct. (libc++
also doesn't currently support building with cl anyway.)

llvm-svn: 307997
2017-07-14 03:56:54 +00:00
Shoaib Meenai 24767a7c2f [libc++] class template -> template class. NFC
llvm-svn: 307972
2017-07-13 22:08:59 +00:00
Shoaib Meenai 5b67cd3567 [libc++] Mark string operator+ _LIBCPP_FUNC_VIS
It has an extern template instantiation declaration in the headers and a
corresponding instantiation definition in the library, so we must mark
it with _LIBCPP_FUNC_VIS to make it available outside the library.

This doesn't cause any ABI changes as-is since we don't build libc++
with hidden visibility (so the function is exported anyway). It's needed
for building libc++ with hidden visibility, however.

Clarify the Windows behavior for extern function templates while I'm
here, since this exercises that behavior.

llvm-svn: 307966
2017-07-13 21:35:52 +00:00
Shoaib Meenai c44edbcc94 [libc++] Remove unused _LIBCPP_FUNC_VIS_ONLY
This has been unused since r282644.

llvm-svn: 307965
2017-07-13 21:28:17 +00:00
Shoaib Meenai 982060b0a4 [libc++] Use proper template terminology. NFC
It's supposed to be "class template" and "function template" instead of
"template class" and "template function".

llvm-svn: 307954
2017-07-13 20:47:24 +00:00
Ben Craig 7e17e52b87 Fix unrepresentable enum for clang-cl unstable ABI
When using LIBCXX_ABI_UNSTABLE=YES, clang-cl gave the following warning:

P:\llvm_master\src\llvm\projects\libcxx\include\string(683,51):
warning: enumerator value is not representable in the underlying type
'int' [-Wmicrosoft-enum-value]

Fixed by switching from enums to static const size_type.

https://reviews.llvm.org/D35174

llvm-svn: 307751
2017-07-12 01:45:13 +00:00