aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/delete.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-09-13 20:15:54 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-09-13 20:15:54 +0000
commit4076dacf1497fb95cb298b9d964fbdbdaf9bde6c (patch)
tree5b91fb94a2e1a10ffbd30a975bebb9865c88395e /test/CodeGenCXX/delete.cpp
parentf1b8911d35bb2830a13267581d3cbde4b6b85db6 (diff)
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
Diffstat (limited to 'test/CodeGenCXX/delete.cpp')
-rw-r--r--test/CodeGenCXX/delete.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGenCXX/delete.cpp b/test/CodeGenCXX/delete.cpp
index 1f52a783e6..b8726a863e 100644
--- a/test/CodeGenCXX/delete.cpp
+++ b/test/CodeGenCXX/delete.cpp
@@ -105,3 +105,10 @@ namespace test2 {
delete [] b;
}
}
+
+namespace test3 {
+ void f(int a[10][20]) {
+ // CHECK: call void @_ZdaPv(i8*
+ delete a;
+ }
+}