diff options
author | Peng Liu <winner245@hotmail.com> | 2025-03-19 12:08:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-19 12:08:20 -0400 |
commit | 70480fcff64e2e389da8bc48043719a554893c6f (patch) | |
tree | ad48a15fed982848248b55e05bd25f850c27cad0 /clang/lib/CodeGen/ModuleBuilder.cpp | |
parent | 029cb8aff1450ed6d69f671a5e5e3e226316b42a (diff) | |
download | llvm-70480fcff64e2e389da8bc48043719a554893c6f.zip llvm-70480fcff64e2e389da8bc48043719a554893c6f.tar.gz llvm-70480fcff64e2e389da8bc48043719a554893c6f.tar.bz2 |
[libc++] Validate vector<bool> copy/move-assignment operators in realistic scenarios (#119817)
The existing tests for `vector<bool>` copy- and move-assignment
operators are limited to 3 bits only, which are inadequate to cover
realistic scenarios. Most `vector<bool>` operations have code paths that
are executed only when multiple storage words are involved, with each
storage word typically comprising 64 bits on a 64-bit platform.
Furthermore, the existing tests fail to cover all combinations
`POCCA`/`POCMA`, along with different allocator equality and/or
reallocation scenarios, leaving some critical code paths untested.
This patch enhances the test coverage by introducing new tests covering
up to 5 storage words, ensuring that partial words in the front or tail,
and whole words in the middle are all properly tested. Moreover, these
new tests ensure that the copy- and move-assignment operators are tested
under all combinations of `POCCA`/`POCMA` and various allocator equality
scenarios, both with or without reallocations.
Diffstat (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp')
0 files changed, 0 insertions, 0 deletions