From 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 2 May 2011 19:39:53 +0000 Subject: Vendor import of clang trunk r130700: http://llvm.org/svn/llvm-project/cfe/trunk@130700 --- test/CodeGenCXX/class-layout.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/CodeGenCXX/class-layout.cpp') diff --git a/test/CodeGenCXX/class-layout.cpp b/test/CodeGenCXX/class-layout.cpp index 6675b49..96fbae8 100644 --- a/test/CodeGenCXX/class-layout.cpp +++ b/test/CodeGenCXX/class-layout.cpp @@ -17,3 +17,31 @@ namespace Test3 { // CHECK: %"struct.Test3::A" = type { i32 (...)**, i32 } struct A { virtual void f(); int a; } *a; } + +namespace Test4 { + // Test from PR5589. + // CHECK: %"struct.Test4::A" = type { i32, i8, float } + // CHECK: %"struct.Test4::B" = type { %"struct.Test4::A", i16, double } + struct A { + int a; + char c; + float b; + }; + struct B : public A { + short d; + double e; + } *b; +} + +namespace Test5 { + struct A { + virtual void f(); + char a; + }; + + // CHECK: %"struct.Test5::B" = type { [9 x i8], i8, i8, [5 x i8] } + struct B : A { + char b : 1; + char c; + } *b; +} -- cgit v1.1