When applying 'delete' on a pointer-to-array type match GCC and EDG behavior and treat it as 'delete[]'.
Also offer a fix-it hint adding '[]'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113778 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/delete.cpp b/test/CodeGenCXX/delete.cpp
index 1f52a78..b8726a8 100644
--- a/test/CodeGenCXX/delete.cpp
+++ b/test/CodeGenCXX/delete.cpp
@@ -105,3 +105,10 @@
delete [] b;
}
}
+
+namespace test3 {
+ void f(int a[10][20]) {
+ // CHECK: call void @_ZdaPv(i8*
+ delete a;
+ }
+}