[libcxx-commits] [libcxx] [libc++][NFC] Remove a bunch of redundant ASan existence checks (PR #128504)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 30 07:03:36 PDT 2025


ldionne wrote:

Yeah.. that's tricky. I'd argue that a (most likely generated?) function with 4000 assignment statements like this is a degenerate case. I mean something similar could happen with any other legitimate code transformation inside libc++.

I'd suggest rewriting the function as

```
std::pair<char const*, char const*> data = {{"some text", "other text"}, ...};
m.insert(begin(data), end(data));
```

or something similar.

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


More information about the libcxx-commits mailing list