Page MenuHomeFreeBSD

libc++: silence -Wnontrivial-memaccess warning with newer clang
ClosedPublic

Authored by arichardson on Sep 14 2025, 11:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 15, 6:42 AM
Unknown Object (File)
Sun, Nov 9, 12:11 AM
Unknown Object (File)
Thu, Nov 6, 10:20 PM
Unknown Object (File)
Tue, Nov 4, 1:03 PM
Unknown Object (File)
Tue, Nov 4, 4:54 AM
Unknown Object (File)
Wed, Oct 29, 10:43 AM
Unknown Object (File)
Tue, Oct 28, 7:12 PM
Unknown Object (File)
Sun, Oct 26, 3:40 PM
Subscribers

Details

Summary

Apply part of LLVM commit 71315698c91d0cda054b903da0594ca6f072c350 to
silence the -Wnontrivial-memaccess warning that is triggered any time
this function is instantiated by user code. This fixes another
buildworld failure with Clang HEAD.

Original commit message:
[clang] Warn about memset/memcpy to NonTriviallyCopyable types (#111434)
This implements a warning that's similar to what GCC does in that
context: both memcpy and memset require their first and second operand
to be trivially copyable, let's warn if that's not the case.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable