| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 305292
|
|
|
|
|
|
| |
ill-formed if N >= M. We didn't do that. Add a static_assert to cause a failure, and a test that checks that we failed
llvm-svn: 305191
|
|
|
|
|
|
|
|
|
|
| |
with another constant".
The expressions `1 == 1` and `true` have the same type, value category, and value.
Fixes D32924.
llvm-svn: 302322
|
|
|
|
| |
llvm-svn: 302105
|
|
|
|
| |
llvm-svn: 300652
|
|
|
|
|
|
|
|
| |
std::unordered_multimap
This completes the cleanup of the containers, at least within the tests.
llvm-svn: 300620
|
|
|
|
|
|
| |
std::unordered_multiset
llvm-svn: 300619
|
|
|
|
| |
llvm-svn: 300604
|
|
|
|
| |
llvm-svn: 300602
|
|
|
|
| |
llvm-svn: 300600
|
|
|
|
| |
llvm-svn: 300595
|
|
|
|
| |
llvm-svn: 300451
|
|
|
|
|
|
| |
extra tests
llvm-svn: 300449
|
|
|
|
| |
llvm-svn: 300417
|
|
|
|
| |
llvm-svn: 300415
|
|
|
|
| |
llvm-svn: 300414
|
|
|
|
| |
llvm-svn: 300413
|
|
|
|
| |
llvm-svn: 300412
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch cleans up all usages of the following feature test macros inside
<vector> and its tests:
* _LIBCPP_HAS_NO_RVALUE_REFERENCES
* _LIBCPP_HAS_NO_VARIADICS
* _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
Where needed the above guards were replaced with _LIBCPP_CXX03_LANG.
llvm-svn: 300410
|
|
|
|
| |
llvm-svn: 299411
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
By manipulating a local variable in the loop, when the loop can
be optimized away (due to no non-trivial destructors), this lets
it be fully optimized away and we modify the __end_ separately.
This results in a substantial improvement in the generated code.
Prior to this change, this would be generated (on x86_64):
movq (%rdi), %rdx
movq 8(%rdi), %rcx
cmpq %rdx, %rcx
je LBB2_2
leaq -12(%rcx), %rax
subq %rdx, %rax
movabsq $-6148914691236517205, %rdx ## imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq $3, %rdx
notq %rdx
leaq (%rdx,%rdx,2), %rax
leaq (%rcx,%rax,4), %rax
movq %rax, 8(%rdi)
And after:
movq (%rdi), %rax
movq %rax, 8(%rdi)
This brings this in line with what other implementations do.
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25241
llvm-svn: 298601
|
|
|
|
|
|
| |
functions (optional<T> and unique_ptr<T>) which were mistakenly marked as 'noexcept'. Reviewed as https://reviews.llvm.org/D31234
llvm-svn: 298573
|
|
|
|
| |
llvm-svn: 296851
|
|
|
|
| |
llvm-svn: 296568
|
|
|
|
| |
llvm-svn: 295434
|
|
|
|
|
|
| |
in c++17. Use shuffle() instead. No change to libc++, just the tests.
llvm-svn: 294328
|
|
|
|
|
|
|
|
| |
These typedefs were completely unused.
Fixes D29136.
llvm-svn: 294155
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Guard typedefs and static_asserts with _LIBCPP_VERSION.
test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
Additionally deal with conditional compilation.
test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp
Additionally deal with typedefs used by other typedefs.
Fixes D29135.
llvm-svn: 294154
|
|
|
|
|
|
| |
with C++14 or before. Resolves PR31680.
llvm-svn: 292990
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Exactly what the title says.
This patch also adds a `std::hash<nullptr_t>` specialization in C++17, but it was not added by this paper and I can't find the actual paper that adds it.
See http://wg21.link/P0513R0 for more info.
If there are no comments in the next couple of days I'll commit this
Reviewers: mclow.lists, K-ballo, EricWF
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D28938
llvm-svn: 292684
|
|
|
|
|
|
| |
No functional change, no code review.
llvm-svn: 292434
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC has compiler warnings C4127 "conditional expression is constant" (enabled
by /W4) and C6326 "Potential comparison of a constant with another constant"
(enabled by /analyze). They're potentially useful, although they're slightly
annoying to library devs who know what they're doing. In the latest version of
the compiler, C4127 is suppressed when the compiler sees simple tests like
"if (name_of_thing)", so extracting comparison expressions into named
constants is a workaround. At the same time, using std::integral_constant
avoids C6326, which doesn't look at template arguments.
test/std/containers/sequences/vector.bool/emplace.pass.cpp
Replace 1 == 1 with true, which is the same as far as the library is concerned.
Fixes D28837.
llvm-svn: 292432
|
|
|
|
| |
llvm-svn: 292091
|
|
|
|
| |
llvm-svn: 291322
|
|
|
|
|
|
| |
reverse_iterator, move_iterator, array and Range Access' for C++17
llvm-svn: 290976
|
|
|
|
| |
llvm-svn: 290657
|
|
|
|
| |
llvm-svn: 290476
|
|
|
|
| |
llvm-svn: 290474
|
|
|
|
| |
llvm-svn: 290459
|
|
|
|
|
|
|
|
|
|
|
|
| |
allocator.
In list::remove we collect the nodes we're removing in a seperate
list instance. However we construct this list using the default
constructor which default constructs the allocator. However allocators
are not required to be default constructible. This patch fixes the
construction of the second list.
llvm-svn: 289735
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
size_type/difference_type.
test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp
test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp
Iterate with C::size_type because that's what operator[] takes.
test/std/containers/sequences/vector/contiguous.pass.cpp
test/std/strings/basic.string/string.require/contiguous.pass.cpp
Add static_cast<typename C::difference_type> because that's what the iterator's operator+ takes.
Fixes D27777.
llvm-svn: 289734
|
|
|
|
|
|
|
|
| |
Value-initialized iterators still can't be compared to those with parents.
Fixes D26626.
llvm-svn: 289462
|
|
|
|
| |
llvm-svn: 289363
|
|
|
|
| |
llvm-svn: 289359
|
|
|
|
|
|
|
|
|
|
|
|
| |
These swap tests were swapping non-POCS non-equal allocators which
is undefined behavior. This patch changes the tests to use allocators
which compare equal. In order to test that the allocators were not
swapped I added an "id" field to test_allocator which does not
participate in equality but does propagate across copies/swaps.
This patch is based off of D26623 which was submitted by STL.
llvm-svn: 289358
|
|
|
|
| |
llvm-svn: 289204
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
loss of data", part 6/7.
test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
(Affects 64-bit architectures.) Include <cstddef> so we can take/return std::ptrdiff_t
(instead of int) in random_shuffle()'s RNG. (C++14 D.12 [depr.alg.random.shuffle]/2 says that
difference_type is used, and we're shuffling a plain array.)
test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
(Affects 64-bit architectures.) Include <iterator> because we're already using iterator_traits.
Then, store the result of subtracting two RanIts as difference_type instead of long
(which truncates on LLP64 architectures like MSVC x64).
test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp
test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp
(Affects 64-bit architectures.) Include <cstddef> so we can store the result of
subtracting two pointers as std::ptrdiff_t (instead of int).
test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
(Affects 32-bit architectures.) Sometimes, size_t is too small. That's the case here,
where tellg() returns pos_type (N4606 27.7.2.3 [istream.unformatted]/39). Implementations can
have 64-bit pos_type (to handle large files) even when they have 32-bit size_t.
Fixes D27543.
llvm-svn: 289110
|
|
|
|
|
|
|
|
|
|
| |
loss of data", part 3/7.
Add static_cast<short> when constructing pair<Whatever, short> from (Something, int).
Fixes D27540.
llvm-svn: 289107
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to 'int' [or 'unsigned int'], possible loss of data", part 3/4.
test/std/containers/sequences/vector.bool/copy.pass.cpp
test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp
test/std/containers/sequences/vector/vector.cons/copy.pass.cpp
test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
Change "unsigned s = x.size();" to "typename C::size_type s = x.size();"
because that's what it returns.
test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp
Include <cstddef>, then change "unsigned n = T::length(s);"
to "std::size_t n = T::length(s);" because that's what char_traits returns.
test/std/strings/basic.string/string.cons/substr.pass.cpp
Change unsigned to typename S::size_type because that's what str.size() returns.
test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
This was needlessly truncating std::size_t to unsigned.
It's being used to compare and initialize std::size_t.
llvm-svn: 288753
|
|
|
|
| |
llvm-svn: 288750
|