delete => delete[] for arrays.

llvm-svn: 221769
This commit is contained in:
Richard Trieu 2014-11-12 04:19:57 +00:00
parent 9ec8cea02b
commit b6b141d601
2 changed files with 5 additions and 5 deletions

View File

@ -832,7 +832,7 @@ NOINLINE static int LargeFunction(bool do_bad_access) {
x[18]++;
x[19]++;
delete x;
delete[] x;
return res;
}

View File

@ -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;
}