diff options
author | Anders Carlsson <andersca@mac.com> | 2010-02-04 17:32:58 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-02-04 17:32:58 +0000 |
commit | 824e0613deaff8628ef6a7c9296802698994a0d2 (patch) | |
tree | 754375d44a774dce3de92ca8f19af73a45aff627 /clang/test/CodeGenCXX/temporaries.cpp | |
parent | 3460aa1079c2bc378e9cf264950f17666ada96c8 (diff) | |
download | bcm5719-llvm-824e0613deaff8628ef6a7c9296802698994a0d2.tar.gz bcm5719-llvm-824e0613deaff8628ef6a7c9296802698994a0d2.zip |
When binding an lvalue to a reference, we always need to pop temporaries.
With this fix, and the other fixes committed today a make check-all with a clang-built LLVM now gives:
Expected Passes : 6933
Expected Failures : 46
Unsupported Tests : 40
Unexpected Failures: 27
which means that we pass 99.96% of all tests :) The resulting 27 tests are all LLVMC tests and seem to be because of differences in the clang and gcc drivers.
llvm-svn: 95313
Diffstat (limited to 'clang/test/CodeGenCXX/temporaries.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/temporaries.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/temporaries.cpp b/clang/test/CodeGenCXX/temporaries.cpp index c33ca4ebff2..3b624afd0ad 100644 --- a/clang/test/CodeGenCXX/temporaries.cpp +++ b/clang/test/CodeGenCXX/temporaries.cpp @@ -267,3 +267,24 @@ namespace PR6199 { template A f2<int>(int); } + +namespace T12 { + +struct A { + A(); + ~A(); + int f(); +}; + +int& f(int); + +// CHECK: define void @_ZN3T121gEv +void g() { + // CHECK: call void @_ZN3T121AC1Ev + // CHECK-NEXT: call i32 @_ZN3T121A1fEv( + // CHECK-NEXT: call i32* @_ZN3T121fEi( + // CHECK-NEXT: call void @_ZN3T121AD1Ev( + int& i = f(A().f()); +} + +} |