diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-01 10:34:51 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-01 10:34:51 +0000 |
| commit | abe15e553e58165e7692c0d0842865c488ed7b45 (patch) | |
| tree | 1e68501209c9133fbda8d45171e59f8d6f12dd55 /test/CodeGenCXX/constructor-init.cpp | |
| parent | 34d02d0b37f16015f317a935c48ce8b7b64ae77b (diff) | |
Notes
Diffstat (limited to 'test/CodeGenCXX/constructor-init.cpp')
| -rw-r--r-- | test/CodeGenCXX/constructor-init.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/test/CodeGenCXX/constructor-init.cpp b/test/CodeGenCXX/constructor-init.cpp index 1b025126a345..a0a35fa16f1b 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 +} |
