summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__bit_reference
Commit message (Collapse)AuthorAgeFilesLines
* [libc++] Fix ABI break in __bit_reference.Eric Fiselier2020-02-201-0/+15
| | | | | | | | | | | | | | | | | | | The libc++ __bit_iterator type has weird ABI calling conventions as a quirk of the implementation. The const bit iterator is trivial, but the non-const bit iterator is not because it declares a user-defined copy constructor. Changing this now is an ABI break, so this test ensures that each type is trivial/non-trivial as expected. The definition of 'non-trivial for the purposes of calls': A type is considered non-trivial for the purposes of calls if: * it has a non-trivial copy constructor, move constructor, or destructor, or * all of its copy and move constructors are deleted. (cherry picked from commit a829443cc7359ecf0f2de8f82519f511795675ec)
* [libc++] Cleanup and enable multiple warnings.Eric Fiselier2019-12-121-1/+5
| | | | | | | | | | Too many warnings are being disabled too quickly. Warnings are important to keeping libc++ correct. This patch re-enables two warnings: -Wconstant-evaluated and -Wdeprecated-copy. In future, all warnings disabled for the test suite should require an attached bug. The bug should state the plan for re-enabling that warning, or a strong case why it should remain disabled.
* __bit_reference: fix -Wdeprecated-copy warningsFangrui Song2019-12-121-1/+7
| | | | | | | | | | | | | | Since C++11, [depr.impldec]: The implicit definition of a copy constructor as defaulted is deprecated if the class has a user-declared copy assignment operator or a user-declared destructor. At clang HEAD, -Wdeprecated-copy (included by -Wextra) will warn on such instances. Reviewed By: EricWF Differential Revision: https://reviews.llvm.org/D71096
* Temporarily Revert "[libc++] Fix -Wdeprecated-copy warnings in __bit_reference"Eric Christopher2019-12-121-3/+0
| | | | | | as it's causing test failures due to mismatched visibility. This reverts commit 02bb20223bda5add729402962c70d0ebd0d98af2.
* [libc++] Fix -Wdeprecated-copy warnings in __bit_referenceEric Christopher2019-12-111-0/+3
| | | | | | | | Add a couple of default copy constructors to fix the warning. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D71395
* [libc++] Rename __to_raw_pointer to __to_address.Eric Fiselier2019-11-161-6/+6
| | | | | | | This function has the same behavior as the now-standand std::to_address. Re-using the name makes the behavior more clear, and in the future it will allow us to correctly get the raw pointer for user provided pointer types.
* Reorganize the 'bit' header to make most of the facilities available for ↵Marshall Clow2019-07-121-14/+14
| | | | | | internal use pre-C++20. NFC for external users llvm-svn: 365854
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* Refactor the newly created <bit> header. Still (almost) NFC. Reviewed as ↵Marshall Clow2018-08-171-6/+7
| | | | | | https://reviews.llvm.org/D50876 llvm-svn: 340049
* [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on WindowsEric Fiselier2017-05-311-2/+6
| | | | | | | | | | | | | | | | Summary: This patch improves how libc++ handles min/max macros within the headers. Previously libc++ would undef them and emit a warning. This patch changes libc++ to use `#pragma push_macro` to save the macro before undefining it, and `#pragma pop_macro` to restore the macros and the end of the header. Reviewers: mclow.lists, bcraig, compnerd, EricWF Reviewed By: EricWF Subscribers: cfe-commits, krytarowski Differential Revision: https://reviews.llvm.org/D33080 llvm-svn: 304357
* Add _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM] macros.Eric Fiselier2017-01-061-12/+2
| | | | | | | | | | | | This patch refactors the compiler detection done in `__config` by creating a set of `_LIBCPP_COMPILER_<TYPE>` macros. The goal of this patch is to make it easier to detect what compiler is being used outside of `__config`. Additionally this patch removes workarounds for GCC in `__bit_reference`. I tested GCC 4.8 and 4.9 without the workaround and neither seemed to need it anymore. llvm-svn: 291286
* fix sign comparison warningsEric Fiselier2016-12-241-14/+14
| | | | llvm-svn: 290469
* Get tests running with warnings. Fix warnings in headers and testsEric Fiselier2015-02-051-1/+0
| | | | llvm-svn: 228344
* Fix PR22000. __bit_iterator::move_backwards. Also make a note that ↵Marshall Clow2014-12-221-1/+1
| | | | | | | | __bit_iterator is quite underrepresented in the libc++ tests suite. llvm-svn: 224723
* Fix PR 19663. Some calls to find(vector<bool>) were returning iterators that ↵Marshall Clow2014-05-061-2/+2
| | | | | | were subtly invalid (didn't compare equal). Thanks to Erik Verbruggen for the report (and diagnosis) llvm-svn: 208096
* Patch by GM: Adding MSVC support to __bit_referenceMarshall Clow2013-10-211-3/+3
| | | | llvm-svn: 193084
* G M: Changes all references to "x inline" to "inline x" where x = ↵Howard Hinnant2013-10-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | _libcpp_always_inline or _libcpp_inline_visibility macros. The patch touches these files: locale array deque new string utility vector __bit_reference __split_buffer locale_win32.h There is no intended functionality change and it is expected that reversing the position of the inline keyword with regard to the other keywords does not change the meaning of anything, least not for apple/Linux etc. It is intended to make libcxx more consistent with itself and to prevent the 1000 or so "inline.cpp(3) : warning C4141: 'inline' : used more than once" warnings that MS's cl.exe compiler emits without this patch, i.e. if inline is not the first keyword before a function name etc. Prefer "inline [other inline related keyword]" over "[other related keyword] inline". After this patch, libcxx should be consistent to this pattern. llvm-svn: 191987
* Xing Xue: port to IBM XLC++/AIX.Howard Hinnant2013-08-141-3/+3
| | | | llvm-svn: 188396
* N3644 support for vector<bool>Marshall Clow2013-08-071-1/+5
| | | | llvm-svn: 187911
* Correct logic bug in find optimization for vector<bool>. This fixes ↵Howard Hinnant2013-08-071-0/+4
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=16816 llvm-svn: 187908
* Implement full support for non-pointer pointers in custom allocators for vector.Howard Hinnant2013-06-271-7/+18
| | | | llvm-svn: 185093
* Need one more swap overload for swapping two lvalue vector<bool>::reference's.Howard Hinnant2013-03-261-0/+10
| | | | llvm-svn: 178016
* std::equal operating on non-const __bit_iterators was not working. This ↵Howard Hinnant2012-08-051-14/+14
| | | | | | fixes it. llvm-svn: 161309
* Apply constexpr to <bitset>.Howard Hinnant2012-07-071-1/+2
| | | | llvm-svn: 159899
* Fix dangling else clause. Bug found and fixed by Dimitry Andric.Howard Hinnant2012-05-311-0/+4
| | | | llvm-svn: 157779
* Fix several bugs in find/count specialized for bits.Howard Hinnant2012-05-101-32/+32
| | | | llvm-svn: 156546
* Add friends __count_bool_true and __count_bool_false to __bit_iterator.Howard Hinnant2012-05-101-0/+4
| | | | llvm-svn: 156543
* SFINAE __bit_iterator such that it will only get instantiated with a ↵Howard Hinnant2012-05-071-2/+3
| | | | | | container that has the nested type __storage_type. This prevents accidental instantiation such as in http://llvm.org/bugs/show_bug.cgi?id=12755. This fixes http://llvm.org/bugs/show_bug.cgi?id=12755. llvm-svn: 156308
* Quash a whole bunch of warningsHoward Hinnant2011-12-011-2/+1
| | | | llvm-svn: 145624
* Further macro protection by replacing _[A-Z] with _[A-Z]pHoward Hinnant2011-11-291-175/+175
| | | | llvm-svn: 145410
* Add protection from min/max macrosHoward Hinnant2011-11-291-0/+2
| | | | llvm-svn: 145407
* More windows port work by Ruben Van BoxemHoward Hinnant2011-10-221-8/+8
| | | | llvm-svn: 142732
* Windows support by Ruben Van Boxem.Howard Hinnant2011-10-171-0/+2
| | | | llvm-svn: 142235
* Work on Windows port by Ruben Van BoxemHoward Hinnant2011-09-231-23/+23
| | | | llvm-svn: 140384
* http://llvm.org/bugs/show_bug.cgi?id=10248Howard Hinnant2011-07-021-1/+12
| | | | llvm-svn: 134327
* _STD -> _VSTD to avoid macro clash on windowsHoward Hinnant2011-06-301-47/+47
| | | | llvm-svn: 134190
* noexcept for <bitset>.Howard Hinnant2011-05-271-18/+27
| | | | llvm-svn: 132216
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* visibility-decoration.Howard Hinnant2010-09-211-0/+1
| | | | llvm-svn: 114451
* Fixing whitespace problemsHoward Hinnant2010-08-221-8/+8
| | | | llvm-svn: 111750
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-111-1/+1
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-111-0/+1224
llvm-svn: 103490
OpenPOWER on IntegriCloud