summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/constructor-init.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-01-01 10:34:51 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-01-01 10:34:51 +0000
commitbb1e3bc1e0be2b8f891db46457a8943451bf4d8b (patch)
tree1e68501209c9133fbda8d45171e59f8d6f12dd55 /test/CodeGenCXX/constructor-init.cpp
parent77212133072dc40f070a280af8217032f55a9eb4 (diff)
downloadFreeBSD-src-bb1e3bc1e0be2b8f891db46457a8943451bf4d8b.zip
FreeBSD-src-bb1e3bc1e0be2b8f891db46457a8943451bf4d8b.tar.gz
Updaet clang to 92395.
Diffstat (limited to 'test/CodeGenCXX/constructor-init.cpp')
-rw-r--r--test/CodeGenCXX/constructor-init.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/test/CodeGenCXX/constructor-init.cpp b/test/CodeGenCXX/constructor-init.cpp
index 1b02512..a0a35fa 100644
--- a/test/CodeGenCXX/constructor-init.cpp
+++ b/test/CodeGenCXX/constructor-init.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -emit-llvm -o %t
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -emit-llvm -o - | FileCheck %s
extern "C" int printf(...);
@@ -59,3 +59,24 @@ int main() {
n1.PR();
}
+// PR5826
+template <class T> struct A {
+ A() {}
+ A(int) {}
+ A(const A&) {}
+ ~A() {}
+ operator int() {return 0;}
+};
+
+// CHECK: define void @_Z1fv()
+void f() {
+ // CHECK: call void @_ZN1AIsEC1Ei
+ A<short> a4 = 97;
+
+ // CHECK-NEXT: store i32 17
+ int i = 17;
+
+ // CHECK-NEXT: call void @_ZN1AIsED1Ev
+ // CHECK-NOT: call void @_ZN1AIsED1Ev
+ // CHECK: ret void
+}
OpenPOWER on IntegriCloud