diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-02 01:13:06 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-02 01:13:06 +0000 |
commit | 802e22682c17c4a9df3f747abd224db38e382e39 (patch) | |
tree | 4623c1c26979216f480a54a02eb8ae04ac823abf /test/CodeGenCXX/global-array-destruction.cpp | |
parent | 975f253bb31f665171517d43de6686e56507abac (diff) |
Don't forget to run destructors when we create an array temporary of class type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/global-array-destruction.cpp')
-rw-r--r-- | test/CodeGenCXX/global-array-destruction.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGenCXX/global-array-destruction.cpp b/test/CodeGenCXX/global-array-destruction.cpp index b86432228c..087d655f0a 100644 --- a/test/CodeGenCXX/global-array-destruction.cpp +++ b/test/CodeGenCXX/global-array-destruction.cpp @@ -51,3 +51,12 @@ static T t2[2][3] = { 1.0, 2, 3.0, 4, 5.0, 6, 7.0, 8, 9.0, 10, 11.0, 12 }; // CHECK: call void @_ZN1TD1Ev // CHECK: icmp eq {{.*}} @_ZL2t // CHECK: br i1 {{.*}} + +using U = T[2][3]; +U &&u = U{ {{1.0, 2}, {3.0, 4}, {5.0, 6}}, {{7.0, 8}, {9.0, 10}, {11.0, 12}} }; + +// CHECK: call {{.*}} @__cxa_atexit +// CHECK: getelementptr inbounds ([2 x [3 x {{.*}}]]* @_ZGR1u, i64 1, i64 0, i64 0) +// CHECK: call void @_ZN1TD1Ev +// CHECK: icmp eq {{.*}} @_ZGR1u +// CHECK: br i1 {{.*}} |