Commit Graph

4306 Commits

Author SHA1 Message Date
Stephan T. Lavavej 6f297ba8a9 [libcxx] [www] Change an absolute link to cxx1z_status.html to be relative.
Fixes D37318.

llvm-svn: 312263
2017-08-31 17:59:51 +00:00
Stephan T. Lavavej 9c88eeb68d [libcxx] [www] Strip trailing whitespace.
Fixes D37318.

llvm-svn: 312262
2017-08-31 17:59:48 +00:00
Stephan T. Lavavej 98fa5d4a97 [libcxx] [www] Fix broken link for LLVM Bugzilla.
Fixes D37318.

llvm-svn: 312261
2017-08-31 17:59:46 +00:00
Stephan T. Lavavej 69c2e1336f [libcxx] [www] Manually change http links to https.
Fixes D37318.

llvm-svn: 312260
2017-08-31 17:59:42 +00:00
Stephan T. Lavavej 907c1ab603 [libcxx] [www] Semi-manually change http://www.open-std.org and http://isocpp.org papers to https://wg21.link .
Fixes D37318.

llvm-svn: 312259
2017-08-31 17:59:39 +00:00
Stephan T. Lavavej 1dc1fa2347 [libcxx] [www] Change http://cplusplus.github.io/LWG/lwg-defects.html# to https://wg21.link/lwg .
Fixes D37318.

llvm-svn: 312258
2017-08-31 17:59:36 +00:00
Stephan T. Lavavej 2956ea46cd [libcxx] [www] Change http://wg21.link to https://wg21.link .
Fixes D37318.

llvm-svn: 312257
2017-08-31 17:59:33 +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
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
Eric Fiselier e3e7c0fb37 Remove <__refstring> header; Move it into source directory.
The libc++ <__refstring> headers has no real reason why it should
be a public header that libc++ ships. The only reason it was in the include
directory was because libc++abi needed it to build the library.

However keeping <__refstring> a header had other problems, like requiring its
dependancies to also be in the headers. For that reason this patch
moves it into the source directory.

To work around libc++abi's need for this header a duplicated copy was added
to libc++abi in r307748. While duplicating the code is an unfortunate solution
it's the best solution that's currently possible.

In the future I would like to start a discussion on the mailing lists about
making libc++abi build as a sub-project of libc++, requiring the libc++ sources
always be present.

llvm-svn: 307749
2017-07-12 01:38:35 +00:00
Eric Fiselier e82f49849b Revert "[libc++] Refactoring __sync_* builtins; NFC (Reland)"
This reverts commit r307595. The commit had some issues that needed
to first be addressed in review.

llvm-svn: 307746
2017-07-12 01:16:33 +00:00
Petr Hosek 510e70fdd5 [libcxx][CMake] Add install path variable to allow overriding the destination
This is going to be used by the runtime build in the multi-target
setup to allow using different install prefix for each target.

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

llvm-svn: 307615
2017-07-11 02:39:50 +00:00
Weiming Zhao f7850fa8b6 [libc++] Refactoring __sync_* builtins; NFC (Reland)
Summary: Wrap __sync_* builtins with __libcpp_ functions to facility future customizations as atomic operations are unavailable on some targets.

Reviewers: danalbert, EricWF, jroelofs

Subscribers: joerg, llvm-commits

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

llvm-svn: 307595
2017-07-10 21:37:35 +00:00
Weiming Zhao ba5b8c8ee7 Revert "[libc++] Refactoring __sync_* builtins; NFC"
This reverts commit 72ff8866bca49ee7d24c87673293b4ce88a039ec.

llvm-svn: 307593
2017-07-10 21:23:32 +00:00
Weiming Zhao 07f6efddc0 [libc++] Refactoring __sync_* builtins; NFC
Summary: Wrap __sync_* builtins with __libcpp_ functions to facility future customizations as atomic operations are unavailable on some targets.

Reviewers: danalbert, EricWF, jroelofs

Subscribers: joerg, llvm-commits

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

llvm-svn: 307591
2017-07-10 21:02:54 +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
Eric Fiselier 226dbd78eb Suppress -Waligned-allocation-unavailable warning in libc++ test suite
llvm-svn: 307218
2017-07-05 22:40:58 +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
David L. Jones 8e293f15db [lit/libcxx] Fix a remaining reference to lit.util.capture() in custom libcxx/Darwin code.
Summary:
This reference to lit.util.capture is functionally identical to
subprocess.check_output, so this change switches to call the library routine
directly.

Reviewers: mzolotukhin, EricWF

Reviewed By: mzolotukhin

Subscribers: sanjoy, llvm-commits

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

llvm-svn: 306755
2017-06-29 23:07:27 +00:00
Shoaib Meenai 8e07cadde0 [libc++] Hoist explicit instantiation above implicit. NFC
The string literal operators have implicit instantiations of
basic_string<char> and basic_string<wchar>, which prevent the dllimport
on the subsequent explicit instantiation declarations from having an
effect. Hoisting the explicit instantiations above the implicit ones
fixes the issue.

I think it's pretty unfortunate that the ordering has such an effect,
and I'd fixed the same issue for dllexport in r288682. dllimport is more
complicated from a codegen perspective, however, and clang's behavior of
ignoring the dllimport when there's a previous implicit instantiation is
consistent with cl, so changing the order is our only recourse.

llvm-svn: 306632
2017-06-29 02:52:46 +00:00
Marshall Clow 797bcb40e3 Updated notest on 2974
llvm-svn: 306581
2017-06-28 18:19:34 +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 77957d19f8 Updated for the Toronto meeting
llvm-svn: 306269
2017-06-26 04:25:15 +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
Stephan T. Lavavej 5984426f91 [libcxx] [test] Strip trailing whitespace. NFC.
llvm-svn: 305848
2017-06-20 21:00:02 +00:00
Stephan T. Lavavej afdc99333a [libcxx] [test] Add more tests to tuple_size_structured_bindings.pass.cpp and make it friendlier to C1XX.
Style/paranoia: 42.1 doesn't have an exact binary representation. Although this doesn't
cause failures, it makes me uncomfortable, so I'm changing it to 42.5.

C1XX rightly warns about unreferenced variables. Adding tests for their values
makes C1XX happy and improves test coverage.

C1XX (somewhat obnoxiously) warns about seeing a struct specialized as a class.
Although the Standard doesn't care, saying struct consistently is better.
(The Standard itself is still inconsistent about whether to depict tuple_element
and tuple_size as structs or classes.)

Fixes D33953.

llvm-svn: 305843
2017-06-20 20:34:50 +00:00
Reid Kleckner 324568f909 Fix discovery of cxxabi.h in the monorepo layout
llvm-svn: 305841
2017-06-20 20:34:13 +00:00
Michael Park 3f1e89380b Add a missing SFINAE condition to the `variant`'s converting constructor.
Remarks: This function shall not participate in overload resolution unless
         `is_same_v<decay_t<T>, variant>` is false, unless `decay_t<T>` is
         neither a specialization of `in_place_type_t` nor a specialization of
         `in_place_index_t`, unless `is_constructible_v<Tj, T>` is true, and
         unless the expression `FUN(std::forward<T>(t))` (with `FUN` being the
         above-mentioned set of imaginary functions) is well formed.

Depends on D34111.

Reviewers: EricWF, K-ballo

Reviewed By: EricWF

Subscribers: fhahn

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

llvm-svn: 305668
2017-06-19 08:25:57 +00:00
Duncan P. N. Exon Smith 8b1b1322f1 path: Use string_view_t consistently
Most of filesystem/path.cpp uses string_view_t. This fixes the two spots
that use string_view directly.

https://reviews.llvm.org/D34332

llvm-svn: 305661
2017-06-19 04:27:41 +00:00
Duncan P. N. Exon Smith 878cf8fbd4 iostreams: Fix deployment target for streams dylib support
Fix an off-by-one in r302172, which triggered building local versions of
the iostreams when deploying to `<= macOS 10.9`, when it should have
been `< macOS 10.9`.  10.9 had the dylib support.

This defines `_LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE` less
often, reducing code size for users with deployment targets of exactly
macOS 10.9 or iOS 7.0.

rdar://problem/32233981

llvm-svn: 305649
2017-06-18 16:50:23 +00:00
Duncan P. N. Exon Smith e203359c45 func.wrap.func.con: Fix test comment
This tests moving `function`, not `const function`.

llvm-svn: 305648
2017-06-18 15:34:47 +00:00
Duncan P. N. Exon Smith b1cb279014 any: Add availability for experimental::bad_any_cast
As a follow up to r302172, add missing availability for bad_any_cast.

rdar://problem/32161524

llvm-svn: 305647
2017-06-18 14:52:26 +00:00
Eric Fiselier 63cfb6872b Fix potential bug by casting to the POSIX specified type
llvm-svn: 305549
2017-06-16 06:17:52 +00:00
Eric Fiselier 56312f5ad5 Allow the libc++ C header wrappers to be included when compiling C.
C99 at least. C89 still fails due to the use of block comments.

NOTE: Having libc++ on the include path when compiling C is not
recommended or ever really supported. However it happens often
enough that this change is warrented.

llvm-svn: 305539
2017-06-16 01:57:41 +00:00
Eric Fiselier f9bc058935 Allow coroutine_handle<const T> to support creation from const references to the promise_type
It seems conceivable that a user would need to get a coroutine handle
having only a const reference to the promise_type, for example from
within a const member function of the promise.

This patch allows that use case. A coroutine_handle<const T> can be used
in essentially the same way a coroutine_handle<T>, ie to start and destroy
the coroutine. The constness of the promise doesn't/shouldn't propagate
to the handle.

llvm-svn: 305536
2017-06-16 00:36:17 +00:00
Marshall Clow 3ebdbb5c80 Add missing include to __bsd_locale_fallbacks.h. Fixes https://bugs.llvm.org/show_bug.cgi?id=33370
llvm-svn: 305469
2017-06-15 14:31:11 +00:00