File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3884,6 +3884,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
38843884 <returnValue type="wchar_t *"/>
38853885 <noreturn>false</noreturn>
38863886 <leak-ignore/>
3887+ <not-overlapping-data ptr1-arg="1" ptr2-arg="2" size-arg="3"/>
38873888 <arg nr="1" direction="out">
38883889 <not-null/>
38893890 <minsize type="argvalue" arg="3"/>
Original file line number Diff line number Diff line change @@ -9342,6 +9342,25 @@ class TestOther : public TestFixture {
93429342 " memcpy(a, a+1, 2u);\n "
93439343 " }" );
93449344 ASSERT_EQUALS (" [test.cpp:3]: (error) Overlapping read/write in memcpy() is undefined behavior\n " , errout.str ());
9345+
9346+ // wmemcpy
9347+ check (" void foo() {\n "
9348+ " wchar_t a[10];\n "
9349+ " wmemcpy(&a[5], &a[4], 2u);\n "
9350+ " }" );
9351+ ASSERT_EQUALS (" [test.cpp:3]: (error) Overlapping read/write in wmemcpy() is undefined behavior\n " , errout.str ());
9352+
9353+ check (" void foo() {\n "
9354+ " wchar_t a[10];\n "
9355+ " wmemcpy(a+5, a+4, 2u);\n "
9356+ " }" );
9357+ ASSERT_EQUALS (" [test.cpp:3]: (error) Overlapping read/write in wmemcpy() is undefined behavior\n " , errout.str ());
9358+
9359+ check (" void foo() {\n "
9360+ " wchar_t a[10];\n "
9361+ " wmemcpy(a, a+1, 2u);\n "
9362+ " }" );
9363+ ASSERT_EQUALS (" [test.cpp:3]: (error) Overlapping read/write in wmemcpy() is undefined behavior\n " , errout.str ());
93459364 }
93469365};
93479366
You can’t perform that action at this time.
0 commit comments