diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-08-25 23:14:56 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-08-25 23:14:56 +0000 |
| commit | 1194d5e3d2309d449a020df6b9fdf97207ef86f6 (patch) | |
| tree | 716f3de77d6ef992659991a85ed3c8639d0c2e20 /clang/test/CodeGenCXX/new.cpp | |
| parent | c5e7e703b5254f6a04120b1f13c6cd0c7518e867 (diff) | |
| download | bcm5719-llvm-1194d5e3d2309d449a020df6b9fdf97207ef86f6.tar.gz bcm5719-llvm-1194d5e3d2309d449a020df6b9fdf97207ef86f6.zip | |
Fix miscompilation. The custom new[]/delete[] methods were not getting called for arrays with more than 1 dimension.
llvm-svn: 112107
Diffstat (limited to 'clang/test/CodeGenCXX/new.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/new.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/new.cpp b/clang/test/CodeGenCXX/new.cpp index 61a5a153ca5..372bf463647 100644 --- a/clang/test/CodeGenCXX/new.cpp +++ b/clang/test/CodeGenCXX/new.cpp @@ -144,3 +144,14 @@ void t13(int n) { // CHECK-NEXT: ret void } + +struct Alloc{ + void* operator new[](size_t size); + void operator delete[](void* p); +}; + +void f() { + // CHECK: call i8* @_ZN5AllocnaEm(i64 200) + // CHECK: call void @_ZN5AllocdaEPv(i8* + delete[] new Alloc[10][20]; +} |

