Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
687fc08e |
| 19-Jul-2024 |
Kazu Hirata <kazu@google.com> |
[ADT] Use UnorderedElementsAre in SetOperationsTest.cpp (NFC) (#99596)
|
#
c0725804 |
| 19-Jul-2024 |
Kazu Hirata <kazu@google.com> |
[ADT] Add unit tests for set_subtract (#99561)
This patch adds a couple of unit tests:
- SetSubtractSmallPtrSet exercises the code path involving remove_if,
added in d772cdd6279de1e578dfdfca74
[ADT] Add unit tests for set_subtract (#99561)
This patch adds a couple of unit tests:
- SetSubtractSmallPtrSet exercises the code path involving remove_if,
added in d772cdd6279de1e578dfdfca7432327a1806c659. Note that
SmallPtrSet supports remove_if.
- SetSubtractSmallVector exercises the code path involving
S1.erase(*SI) and ensures that set_subtract continues to accept S2
being a vector, which does not have contains.
show more ...
|
#
6c4c44b5 |
| 26-Jun-2024 |
Nikita Popov <npopov@redhat.com> |
[SetOperations] Support set containers with remove_if (#96613)
The current set_intersect implementation only works for std::set style
sets that have a value-erase method that does not invalidate it
[SetOperations] Support set containers with remove_if (#96613)
The current set_intersect implementation only works for std::set style
sets that have a value-erase method that does not invalidate iterators.
As such, it cannot be used for set containers like SetVector, which only
has iterator-invalidating erase.
Support such set containers by calling the remove_if method instead, if
it exists. The detection code is adopted from how contains() is detected
inside llvm::is_contained().
show more ...
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3 |
|
#
bf0f94a5 |
| 16-Feb-2023 |
Teresa Johnson <tejohnson@google.com> |
New SetOperations and unittesting for all SetOperations
New set operations split out of D140908 as suggested, and I have added unit testing for all set operations.
This adds a set_intersection, whi
New SetOperations and unittesting for all SetOperations
New set operations split out of D140908 as suggested, and I have added unit testing for all set operations.
This adds a set_intersection, which returns the intersection instead of updating the first set like set_intersect (using a different name analogous to set_difference vs set_subtract).
Also adds a variant of set_subtract that updates two additional set arguments to note which members of the subtrahend were removed from the minuend and which were not.
Differential Revision: https://reviews.llvm.org/D144220
show more ...
|