summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove redundant null pointer check in operator deleteFangrui Song2018-09-251-5/+3
| | | | | | | | | | | | | | | | | | | | C89 4.10.3.2 The free function C99 7.20.3.2 The free function C11 7.22.3.3 The free function If ptr is a null pointer, no action shall occur. _aligned_free on MSDN: If memblock is a NULL pointer, this function simply performs no actions. Reviewers: EricWF, mclow.lists Subscribers: christof, ldionne, cfe-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52401 llvm-svn: 342936
* [libcxx] Fix the binder deprecation tests on Clang 5.Louis Dionne2018-09-2311-110/+46
| | | | | | Tested on Docker containers with Clang 4, 5 and 6. llvm-svn: 342855
* [libcxx] Fix buildbots on DebianLouis Dionne2018-09-2311-0/+11
| | | | | | | | | | | | | | | | Debian build bots are running Clang 4, which apparently does not support the "deprecated" attribute properly. Clang pretends to support the attribute, but the attribute doesn't do anything. (live example: https://wandbox.org/permlink/0De69aXns0t1D59r) On a separate note, I'm not sure I understand why we're even running the libc++ tests under Clang-4. Is this a configuration we support? I can understand that libc++ should _build_ with Clang 4, but it's not clear to me that new libc++ headers should be usable under older compilers like that. llvm-svn: 342854
* [libcxx] Document new symbols __u64toa and __u32toa on DarwinLouis Dionne2018-09-232-0/+5
| | | | | | | | | | | | | | Summary: This is the counterpart for https://reviews.llvm.org/D50130 and https://reviews.llvm.org/D52391 on Darwin. Reviewers: EricWF Subscribers: christof, dexonsmith, cfe-commits, libcxx-commits, lichray Differential Revision: https://reviews.llvm.org/D52396 llvm-svn: 342849
* [libc++] Add deprecated attributes to many deprecated componentsLouis Dionne2018-09-2318-50/+551
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: These deprecation warnings are opt-in: they are only enabled when the _LIBCXX_DEPRECATION_WARNINGS macro is defined, which is not the case by default. Note that this is a first step in the right direction, but I wasn't able to get an exhaustive list of all deprecated components per standard, so there's certainly stuff that's missing. The list of components this commit marks as deprecated is: in C++11: - auto_ptr, auto_ptr_ref - binder1st, binder2nd, bind1st(), bind2nd() - pointer_to_unary_function, pointer_to_binary_function, ptr_fun() - mem_fun_t, mem_fun1_t, const_mem_fun_t, const_mem_fun1_t, mem_fun() - mem_fun_ref_t, mem_fun1_ref_t, const_mem_fun_ref_t, const_mem_fun1_ref_t, mem_fun_ref() in C++14: - random_shuffle() in C++17: - unary_negate, binary_negate, not1(), not2() <rdar://problem/18168350> Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D48912 llvm-svn: 342843
* [NFC][libcxx] Rename helpers with 4 underscores to something more reasonableLouis Dionne2018-09-231-14/+14
| | | | llvm-svn: 342840
* [NFC][libc++] Fix typo in the description of LIBCXX_INCLUDE_BENCHMARKSLouis Dionne2018-09-221-1/+1
| | | | llvm-svn: 342822
* Mark [[nodiscard]] tests unsupported on GCC prior to 7.0Eric Fiselier2018-09-221-0/+3
| | | | llvm-svn: 342821
* Fix UB in SIMD tests.Eric Fiselier2018-09-221-1/+1
| | | | | | | | | One of the SIMD tests attempted to left shift a value by 42, which is UB when the left hand side is a 32 bit integer type. This patch adjusts the test to use the value 4 instead of 42. llvm-svn: 342820
* [libcxx] Readjust nodiscard_extensions.pass.cpp test - just disable for ASANRoman Lebedev2018-09-221-2/+4
| | | | | | | | | | | In rL342814, i have committed a blind fix to unbreak the asan buildbot, but as it was later discussed, the leak is intentional, so we can not fix the failure that way. So this reverts the leak 'fix', and simply disables the test in the presence of ASAN. llvm-svn: 342819
* Mark test as flakyEric Fiselier2018-09-221-0/+2
| | | | llvm-svn: 342818
* Correct docs to reference the new libc++ lists.Eric Fiselier2018-09-222-15/+12
| | | | | | | | We recently added libcxx-dev and libcxx-commits mailing lists. This patch updates the libc++ documentation to correctly reference the libc++ lists instead of the old Clang ones. llvm-svn: 342816
* [libcxx] Blind attempt to fix harmless leak in nodiscard_extensions.pass.cpp ↵Roman Lebedev2018-09-221-1/+2
| | | | | | | | test libcxx-libcxxabi-x86_64-linux-ubuntu-asan complains about a leak here. llvm-svn: 342814
* [libcxx] Fix the definition of the check-cxx-abilist target on DarwinLouis Dionne2018-09-221-7/+11
| | | | | | | | | | | | | | | | Summary: r342805 added support for the check-cxx-abilist target on FreeBSD, but broke the target on macOS in doing so. The problem is that the GENERIC_TARGET_TRIPLE gets overwritten after replacing the FreeBSD regular expression, which nullifies the replacement done with the darwin regular expression. Reviewers: dim, EricWF Subscribers: emaste, mgorny, krytarowski, christof, dexonsmith, cfe-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52394 llvm-svn: 342813
* Document new symbols for __u64toa and __u32toaZhihao Yuan2018-09-221-0/+12
| | | | | | | | | | | | | | | | | Summary: They are introduced in r338479; their Linux ABI changes are recorded in r338486. TODO: Record the Mac OS X ABI changes. Reviewers: EricWF Reviewed By: EricWF Subscribers: christof, ldionne, libcxx-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D52391 llvm-svn: 342810
* [libc++] Add _LIBCPP_ENABLE_NODISCARD and _LIBCPP_NODISCARD_EXT to allow ↵Roman Lebedev2018-09-2212-17/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pre-C++2a [[nodiscard]] Summary: The `[[nodiscard]]` attribute is intended to help users find bugs where function return values are ignored when they shouldn't be. After C++17 the C++ standard has started to declared such library functions as `[[nodiscard]]`. However, this application is limited and applies only to dialects after C++17. Users who want help diagnosing misuses of STL functions may desire a more liberal application of `[[nodiscard]]`. For this reason libc++ provides an extension that does just that! The extension must be enabled by defining `_LIBCPP_ENABLE_NODISCARD`. The extended applications of `[[nodiscard]]` takes two forms: 1. Backporting `[[nodiscard]]` to entities declared as such by the standard in newer dialects, but not in the present one. 2. Extended applications of `[[nodiscard]]`, at the libraries discretion, applied to entities never declared as such by the standard. Users may also opt-out of additional applications `[[nodiscard]]` using additional macros. Applications of the first form, which backport `[[nodiscard]]` from a newer dialect may be disabled using macros specific to the dialect it was added. For example `_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17`. Applications of the second form, which are pure extensions, may be disabled by defining `_LIBCPP_DISABLE_NODISCARD_EXT`. This patch was originally written by me (Roman Lebedev), then but then reworked by Eric Fiselier. Reviewers: mclow.lists, thakis, EricWF Reviewed By: thakis, EricWF Subscribers: llvm-commits, mclow.lists, lebedev.ri, EricWF, rjmccall, Quuxplusone, cfe-commits, christof Differential Revision: https://reviews.llvm.org/D45179 llvm-svn: 342808
* Similar to the handling of darwin target triples, strip the versionDimitry Andric2018-09-221-4/+7
| | | | | | | | | | numbers off of freebsd target triples, when generating the name of the ABI list file for check-cxx-abilist target. Also remove unnecessary parentheses in the regex for darwin, and slightly reword the comment. llvm-svn: 342805
* fix some typos in the docSylvestre Ledru2018-09-203-5/+5
| | | | llvm-svn: 342628
* add a quick link to libc++abiSylvestre Ledru2018-09-201-0/+1
| | | | llvm-svn: 342625
* refresh the libc++ homepageSylvestre Ledru2018-09-202-8/+9
| | | | llvm-svn: 342624
* Fix diagnostic regex in variant tests to tolerate older clang versionsEric Fiselier2018-09-201-1/+1
| | | | llvm-svn: 342609
* Revert "Implement LWG 2221 - No formatted output operator for nullptr."Volodymyr Sapsai2018-09-193-92/+3
| | | | | | | | | This reverts r342566 as it causes on bots linker errors like > Undefined symbols for architecture i386: > "std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(std::nullptr_t)", referenced from: llvm-svn: 342599
* Implement LWG 2221 - No formatted output operator for nullptr. Reviewed as ↵Marshall Clow2018-09-193-3/+92
| | | | | | https://reviews.llvm.org/D44263 llvm-svn: 342566
* Don't require relops on variant alternatives to all return the sameEric Fiselier2018-09-193-35/+182
| | | | | | | | | | | | type. Libc++ correctly asserts that a set of visitors for a variant all return the same type. However, we use the visitation machinary to perform relational operations. This causes a static assertion when some of the alternatives relops return a UDT which is implicitly convertible to bool instead of 'bool' exactly. llvm-svn: 342560
* Remove unused include of "verbose_assert.h"Marshall Clow2018-09-191-1/+0
| | | | llvm-svn: 342524
* Fix typoFangrui Song2018-09-171-1/+1
| | | | llvm-svn: 342361
* Mark LWG#3102 as complete. No code changes, but I updated a test or twoMarshall Clow2018-09-132-1/+7
| | | | llvm-svn: 342103
* Implement the infrastructure for feature-test macros. Very few actual ↵Marshall Clow2018-09-1277-11/+1535
| | | | | | feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955 llvm-svn: 342073
* Actually mark LWG#2953, don't just say you've done so in r342070Marshall Clow2018-09-121-1/+1
| | | | llvm-svn: 342071
* mark LWG#2953 as complete. No code changes required, but added a couple of ↵Marshall Clow2018-09-123-5/+69
| | | | | | extra tests. llvm-svn: 342070
* Update the failure annotations for the uncaught_exceptions test. The ↵Marshall Clow2018-09-121-5/+5
| | | | | | underlying abi library on some Mac OS versions does not support the plural uncaught_exceptions, so libc++ emulates it from the singlar; this means it will only return 0 or 1. llvm-svn: 342063
* Implement LWG #3017. list splice functions should use addressofMarshall Clow2018-09-124-6/+27
| | | | llvm-svn: 342057
* Update the synopsis for <version>. NFCMarshall Clow2018-09-111-0/+79
| | | | llvm-svn: 341990
* Fix PR# 38900 - don't call swap inside of random_shuffle when we'd be ↵Marshall Clow2018-09-111-1/+2
| | | | | | swapping an element with itself llvm-svn: 341975
* ReleaseNotes: update links to use httpsHans Wennborg2018-09-101-6/+6
| | | | llvm-svn: 341789
* [asan] Update a vector's storage annotation during destruction. Reviewed as ↵Marshall Clow2018-09-071-2/+3
| | | | | | https://reviews.llvm.org/D50101. Thanks to bobsayshilol (Ben) for the patch. llvm-svn: 341671
* [libc++] Add a link to the Release notes from the main libc++ documentationLouis Dionne2018-09-061-0/+1
| | | | llvm-svn: 341551
* [libcxx] Add ReleaseNotes.rst file for release notesLouis Dionne2018-09-061-0/+43
| | | | llvm-svn: 341550
* Last week, someone noted that a couple of the time_point member functions ↵Marshall Clow2018-08-293-12/+54
| | | | | | were not constexpr. I looked, and they were right. They were made constexpr in p0505, so I looked at all the other bits in that paper to make sure that I didn't miss anything else. There were a couple methods in the synopsis that should have been marked constexpr, but the code was correct. llvm-svn: 340992
* Use addressof instead of operator& in make_shared. Fixes PR38729. As a ↵Marshall Clow2018-08-285-3/+35
| | | | | | drive-by, make the same change in raw_storage_iterator (twice). llvm-svn: 340823
* Fix ODR violation: namespace-scope helpers should not be declared 'static'.Richard Smith2018-08-271-1/+1
| | | | llvm-svn: 340778
* Mark P0556 as 'in progress'Marshall Clow2018-08-271-2/+2
| | | | llvm-svn: 340752
* [libc++] Fix handling of negated character classes in regexLouis Dionne2018-08-243-10/+51
| | | | | | | | | | | | | | | | Summary: This commit fixes a regression introduced in r316095, where we don't match inverted character classes when there's no negated characrers in the []'s. rdar://problem/43060054 Reviewers: mclow.lists, timshen, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50534 llvm-svn: 340609
* [libc++] Remove race condition in std::asyncLouis Dionne2018-08-243-16/+66
| | | | | | | | | | | | | | | | | Summary: The state associated to the future was set in one thread (with synchronization) but read in another thread without synchronization, which led to a data race. https://bugs.llvm.org/show_bug.cgi?id=38181 rdar://problem/42548261 Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D51170 llvm-svn: 340608
* Comment out #define __cpp_lib_node_extract, we only support half of that ↵Erik Pilkington2018-08-231-1/+2
| | | | | | | | functionality Differential revision: https://reviews.llvm.org/D51172 llvm-svn: 340544
* Disable the aligned allocation test on old mac versions instead of XFAILing itReid Kleckner2018-08-221-6/+6
| | | | | | | | | It looks like this test XPASSes when the deployment target is older than the OS of the system the test is running on. It looks like we run the tests with -mmacosx-version-min=10.12, and that makes the test expect to fail, but it passes. llvm-svn: 340427
* Add diagnostics for min/max algorithms when a InputIterator is used.Eric Fiselier2018-08-222-0/+43
| | | | | | | | | | These algorithms require a ForwardIterator or better. Ensure we diagnose the contract violation at compile time instead of of silently doing the wrong thing. Further algorithms will be audited in upcoming patches. llvm-svn: 340426
* Attempt to unbreak filesystem tests on certain linux distros.Eric Fiselier2018-08-221-1/+6
| | | | | | | | | | | | | | | On some platforms clock_gettime is in librt, which we don't link by default when building the tests. However it is required by the filesystem tests. This patch introduces a workaround which links librt whenever the filesystem tests are enabled. The workaround should later be replaced with a patch that selectively links both libc++fs and librt only when building filesystem specific tests. However, the way the test configuration is set up right now, this is non-trivial. llvm-svn: 340406
* Fix Bug 38644: multimap::clear() missing exception specifier. Add noexcept ↵Marshall Clow2018-08-2213-12/+114
| | | | | | tests for all the containers that have clear(). llvm-svn: 340385
* Teach libc++ to use native NetBSD's max_align_tKamil Rytarowski2018-08-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: The NetBSD headers ship with max_align_t, that is not compatible with the fallback version in libc++. There is no defined a compiler specific symbol in the headers like: - __CLANG_MAX_ALIGN_T_DEFINED - _GCC_MAX_ALIGN_T - __DEFINED_max_align_t Sponsored by <The NetBSD Foundation> Reviewers: chandlerc, dlj, EricWF, joerg Reviewed By: joerg Subscribers: bsdjhb, llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D47814 llvm-svn: 340224
OpenPOWER on IntegriCloud