diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-04-06 00:46:20 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-04-06 00:46:20 +0000 |
commit | 29a11f45849aa87959e780abb0014a1876e0b39e (patch) | |
tree | a532c95fe6233fe2914b1bd1e85a2ff2459cd4ad /test | |
parent | 68eb4c25e961d18f82b47a0a385f90d7af09bcc3 (diff) |
<rdar://problem/13325066> Destroy std::initializer_list temporaries whose lifetime has been extended by reference binding.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp index 8d9fce040f..fc908804c0 100644 --- a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -250,3 +250,22 @@ namespace PR12178 { map m{ {1, 2}, {3, 4} }; } + +namespace rdar13325066 { + struct X { ~X(); }; + + // CHECK: define void @_ZN12rdar133250664loopERNS_1XES1_ + void loop(X &x1, X &x2) { + // CHECK: br label + // CHECK: br i1 + // CHECK: br label + // CHECK call void @_ZN12rdar133250661XD1Ev + // CHECK: br label + // CHECK: br label + // CHECK: call void @_ZN12rdar133250661XD1Ev + // CHECK: br i1 + // CHECK: br label + // CHECK: ret void + for (X x : { x1, x2 }) { } + } +} |