[clang] [libcxx] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 29 10:27:25 PDT 2024


serge-sans-paille wrote:

reproducer:

```
struct nfp_nfd3_tx_desc;

void
nfp_nfdk_tx_ring_reset(struct nfp_nfd3_tx_desc *txds)
{
 __builtin_memset(txds, 0, 8);
}
```

so we basically have an incomplete type, and we shouldn't warn in that case. I'll submit a patch.

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


More information about the cfe-commits mailing list