[compiler-rt] r221769 - delete => delete[] for arrays.

Richard Trieu rtrieu at google.com
Tue Nov 11 20:19:57 PST 2014


Author: rtrieu
Date: Tue Nov 11 22:19:57 2014
New Revision: 221769

URL: http://llvm.org/viewvc/llvm-project?rev=221769&view=rev
Log:
delete => delete[] for arrays.

Modified:
    compiler-rt/trunk/lib/asan/tests/asan_test.cc
    compiler-rt/trunk/lib/msan/tests/msan_test.cc

Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=221769&r1=221768&r2=221769&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Tue Nov 11 22:19:57 2014
@@ -832,7 +832,7 @@ NOINLINE static int LargeFunction(bool d
   x[18]++;
   x[19]++;
 
-  delete x;
+  delete[] x;
   return res;
 }
 

Modified: compiler-rt/trunk/lib/msan/tests/msan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/msan_test.cc?rev=221769&r1=221768&r2=221769&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc (original)
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc Tue Nov 11 22:19:57 2014
@@ -570,7 +570,7 @@ TEST(MemorySanitizer, fread) {
   EXPECT_NOT_POISONED(x[16]);
   EXPECT_NOT_POISONED(x[31]);
   fclose(f);
-  delete x;
+  delete[] x;
 }
 
 TEST(MemorySanitizer, read) {
@@ -583,7 +583,7 @@ TEST(MemorySanitizer, read) {
   EXPECT_NOT_POISONED(x[16]);
   EXPECT_NOT_POISONED(x[31]);
   close(fd);
-  delete x;
+  delete[] x;
 }
 
 TEST(MemorySanitizer, pread) {
@@ -596,7 +596,7 @@ TEST(MemorySanitizer, pread) {
   EXPECT_NOT_POISONED(x[16]);
   EXPECT_NOT_POISONED(x[31]);
   close(fd);
-  delete x;
+  delete[] x;
 }
 
 TEST(MemorySanitizer, readv) {
@@ -2807,7 +2807,7 @@ TEST(MemorySanitizer, scanf) {
   EXPECT_NOT_POISONED(s[4]);
   EXPECT_NOT_POISONED(s[5]);
   EXPECT_POISONED(s[6]);
-  delete s;
+  delete[] s;
   delete d;
 }
 





More information about the llvm-commits mailing list