aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/temporaries.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
commitecb7e5c8afe929ee38155db94de6b084ec32a645 (patch)
tree53010172e19c77ea447bcd89e117cda052ab52e0 /test/CodeGenCXX/temporaries.cpp
parent5044f5c816adfd5cba17f1adee1a10127296d0bf (diff)
Notes
Diffstat (limited to 'test/CodeGenCXX/temporaries.cpp')
-rw-r--r--test/CodeGenCXX/temporaries.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/CodeGenCXX/temporaries.cpp b/test/CodeGenCXX/temporaries.cpp
index 611781886b3ec..3b624afd0ad1b 100644
--- a/test/CodeGenCXX/temporaries.cpp
+++ b/test/CodeGenCXX/temporaries.cpp
@@ -249,3 +249,42 @@ namespace PR5867 {
g2(17);
}
}
+
+// PR6199
+namespace PR6199 {
+ struct A { ~A(); };
+
+ struct B { operator A(); };
+
+ // CHECK: define void @_ZN6PR61992f2IiEENS_1AET_
+ template<typename T> A f2(T) {
+ B b;
+ // CHECK: call void @_ZN6PR61991BcvNS_1AEEv
+ // CHECK-NEXT: ret void
+ return b;
+ }
+
+ 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());
+}
+
+}