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/value-init.cpp | |
| parent | 34d02d0b37f16015f317a935c48ce8b7b64ae77b (diff) | |
Notes
Diffstat (limited to 'test/CodeGenCXX/value-init.cpp')
| -rw-r--r-- | test/CodeGenCXX/value-init.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGenCXX/value-init.cpp b/test/CodeGenCXX/value-init.cpp new file mode 100644 index 000000000000..8b6e43fd8ec0 --- /dev/null +++ b/test/CodeGenCXX/value-init.cpp @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s + +struct A { + virtual ~A(); +}; + +struct B : A { }; + +struct C { + int i; + B b; +}; + +// CHECK: _Z15test_value_initv +void test_value_init() { + // This value initialization requires zero initialization of the 'B' + // subobject followed by a call to its constructor. + // PR5800 + + // CHECK: store i32 17 + // CHECK: call void @llvm.memset.i64 + // CHECK: call void @_ZN1BC1Ev + C c = { 17 } ; + // CHECK: call void @_ZN1CD1Ev +} |
