<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 11, 2014 at 8:19 PM, Richard Trieu <span dir="ltr"><<a href="mailto:rtrieu@google.com" target="_blank">rtrieu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rtrieu<br>
Date: Tue Nov 11 22:19:57 2014<br>
New Revision: 221769<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=221769&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=221769&view=rev</a><br>
Log:<br>
delete => delete[] for arrays.<br></blockquote><div><br></div><div>We could probably just replace all these news and deletes with unique_ptr<T> and unique_ptr<T[]>?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
    compiler-rt/trunk/lib/asan/tests/asan_test.cc<br>
    compiler-rt/trunk/lib/msan/tests/msan_test.cc<br>
<br>
Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=221769&r1=221768&r2=221769&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=221769&r1=221768&r2=221769&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Tue Nov 11 22:19:57 2014<br>
@@ -832,7 +832,7 @@ NOINLINE static int LargeFunction(bool d<br>
   x[18]++;<br>
   x[19]++;<br>
<br>
-  delete x;<br>
+  delete[] x;<br>
   return res;<br>
 }<br>
<br>
<br>
Modified: compiler-rt/trunk/lib/msan/tests/msan_test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/msan_test.cc?rev=221769&r1=221768&r2=221769&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/msan_test.cc?rev=221769&r1=221768&r2=221769&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc (original)<br>
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc Tue Nov 11 22:19:57 2014<br>
@@ -570,7 +570,7 @@ TEST(MemorySanitizer, fread) {<br>
   EXPECT_NOT_POISONED(x[16]);<br>
   EXPECT_NOT_POISONED(x[31]);<br>
   fclose(f);<br>
-  delete x;<br>
+  delete[] x;<br>
 }<br>
<br>
 TEST(MemorySanitizer, read) {<br>
@@ -583,7 +583,7 @@ TEST(MemorySanitizer, read) {<br>
   EXPECT_NOT_POISONED(x[16]);<br>
   EXPECT_NOT_POISONED(x[31]);<br>
   close(fd);<br>
-  delete x;<br>
+  delete[] x;<br>
 }<br>
<br>
 TEST(MemorySanitizer, pread) {<br>
@@ -596,7 +596,7 @@ TEST(MemorySanitizer, pread) {<br>
   EXPECT_NOT_POISONED(x[16]);<br>
   EXPECT_NOT_POISONED(x[31]);<br>
   close(fd);<br>
-  delete x;<br>
+  delete[] x;<br>
 }<br>
<br>
 TEST(MemorySanitizer, readv) {<br>
@@ -2807,7 +2807,7 @@ TEST(MemorySanitizer, scanf) {<br>
   EXPECT_NOT_POISONED(s[4]);<br>
   EXPECT_NOT_POISONED(s[5]);<br>
   EXPECT_POISONED(s[6]);<br>
-  delete s;<br>
+  delete[] s;<br>
   delete d;<br>
 }<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>