[libcxx-commits] [libcxx] [libc++] Fix UB in bitwise logic of {std, ranges}::{fill, fill_n} algorithms (PR #122410)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 14 09:26:32 PST 2025


================

----------------
ldionne wrote:

To address the issue of this not being detected by our test suite, we should do this:

```diff
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 947cfd265136..f5595e4d2444 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -31,6 +31,7 @@ _warningFlags = [
     "-Wno-reserved-module-identifier",
     '-Wdeprecated-copy',
     '-Wdeprecated-copy-dtor',
+    "-Wshift-negative-value",
     # GCC warns about places where we might want to add sized allocation/deallocation
     # functions, but we know better what we're doing/testing in the test suite.
     "-Wno-sized-deallocation",

```

https://github.com/llvm/llvm-project/pull/122410


More information about the libcxx-commits mailing list