mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 08:46:33 +00:00

The capacity is now passed correctly and a test for this path is added. Since we changed the implementation of `reserve(size_type)` to only ever extend, it doesn't make a ton of sense anymore to have `__shrink_or_extend`, since the code paths of `reserve` and `shrink_to_fit` are now almost completely separate. This patch splits up `__shrink_or_extend` so that the individual parts are in `reserve` and `shrink_to_fit` depending on where they are needed. This reverts commit 59f57be94f38758616b1339b293b43af845571af.