Skip to content

Commit caa5c62

Browse files
dschuffkripken
andauthored
Suppress new Clang warnings on memcpy of nontrivially-copyable objects (#22798)
See llvm/llvm-project#111434 --------- Co-authored-by: Alon Zakai <[email protected]>
1 parent 6bdc7e2 commit caa5c62

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ChangeLog.md

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ See docs/process.md for more on how version tagging works.
2020

2121
3.1.71 (in development)
2222
-----------------------
23+
- LLVM's `-Wnontrivial-memaccess` warning has been updated to also warn about
24+
passing non-trivially-copyable destrination parameter to `memcpy`,
25+
`memset` and similar functions for which it is a documented undefined
26+
behavior (#22798). See https://github.com/llvm/llvm-project/pull/111434
2327

2428
3.1.70 - 10/25/24
2529
-----------------

test/test_core.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6795,6 +6795,7 @@ def test_bullet(self, use_cmake):
67956795
'-Wno-format',
67966796
'-Wno-bitfield-constant-conversion',
67976797
'-Wno-int-to-void-pointer-cast',
6798+
'-Wno-nontrivial-memaccess',
67986799
]
67996800

68006801
# extra testing for ASSERTIONS == 2
@@ -6818,7 +6819,7 @@ def test_bullet(self, use_cmake):
68186819
@is_slow_test
68196820
def test_poppler(self):
68206821
# See https://github.com/emscripten-core/emscripten/issues/20757
6821-
self.emcc_args.append('-Wno-deprecated-declarations')
6822+
self.emcc_args.extend(['-Wno-deprecated-declarations', '-Wno-nontrivial-memaccess'])
68226823
poppler = self.get_poppler_library()
68236824
shutil.copy(test_file('poppler/paper.pdf'), '.')
68246825

0 commit comments

Comments
 (0)