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 | d712d0dbddcd97e979b813158fe42fc3a351e460 (patch) | |
tree | 6605ed5fb67df9e920c6ef5adeabfcff13d032ef /clang/test/CodeGenCXX/global-array-destruction.cpp | |
parent | f5209c4b459d3fc21a6bdfff7534ee6a8762b11a (diff) | |
download | bcm5719-llvm-d712d0dbddcd97e979b813158fe42fc3a351e460.tar.gz bcm5719-llvm-d712d0dbddcd97e979b813158fe42fc3a351e460.zip |
Don't forget to run destructors when we create an array temporary of class type.
llvm-svn: 174257
Diffstat (limited to 'clang/test/CodeGenCXX/global-array-destruction.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/global-array-destruction.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/global-array-destruction.cpp b/clang/test/CodeGenCXX/global-array-destruction.cpp index b86432228cf..087d655f0a2 100644 --- a/clang/test/CodeGenCXX/global-array-destruction.cpp +++ b/clang/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 {{.*}} |