diff options
author | Anders Carlsson <andersca@mac.com> | 2009-10-18 21:20:14 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-10-18 21:20:14 +0000 |
commit | 4fa26848acfbec29a748df4b58d6d654027b49c7 (patch) | |
tree | e72dfb59d823d74a12b09016998e52b942898282 /test/CodeGenCXX/temporaries.cpp | |
parent | 01eb9b9683535d8a65c704ad2c545903409e2d36 (diff) |
When building a cast argument, make sure to bind the result to a temporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84448 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/temporaries.cpp')
-rw-r--r-- | test/CodeGenCXX/temporaries.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGenCXX/temporaries.cpp b/test/CodeGenCXX/temporaries.cpp index 03fbd4b8d9..d622193f59 100644 --- a/test/CodeGenCXX/temporaries.cpp +++ b/test/CodeGenCXX/temporaries.cpp @@ -93,3 +93,25 @@ void f6() { F().f(); } +struct G { + G(); + G(A); + ~G(); + operator A(); +}; + +void a(const A&); + +void f7() { + // CHECK: call void @_ZN1AC1Ev + // CHECK: call void @_Z1aRK1A + // CHECK: call void @_ZN1AD1Ev + a(A()); + + // CHECK: call void @_ZN1GC1Ev + // CHECK: call void @_ZN1Gcv1AEv + // CHECK: call void @_Z1aRK1A + // CHECK: call void @_ZN1AD1Ev + // CHECK: call void @_ZN1GD1Ev + a(G()); +} |