aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/class-layout.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-05-30 06:52:33 +0000
committerAnders Carlsson <andersca@mac.com>2010-05-30 06:52:33 +0000
commit83a45e7dab892e9efd3515eca4eb5b81bc3f2126 (patch)
treeba588fa8ed3b0d3529831d75cbc2c320d000e4d1 /test/SemaCXX/class-layout.cpp
parentd28dcd76c78d17ff6196893761cc9c71d97cc02f (diff)
Turn on the new empty base subobject tracking code. It's a bit faster than the previous code. However, it still has quadratic performance, something which I intend to fix shortly in a subsequent patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105161 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/class-layout.cpp')
-rw-r--r--test/SemaCXX/class-layout.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/SemaCXX/class-layout.cpp b/test/SemaCXX/class-layout.cpp
index 0a968c7065..d81944ab9b 100644
--- a/test/SemaCXX/class-layout.cpp
+++ b/test/SemaCXX/class-layout.cpp
@@ -84,4 +84,21 @@ class F : virtual E { };
struct G : virtual E, F { };
SA(0, sizeof(G) == 24);
+
+}
+
+namespace Test2 {
+
+// Test that this somewhat complex class structure is laid out correctly.
+struct A { };
+struct B : A { virtual void b(); };
+struct C : virtual B { };
+struct D : virtual A { };
+struct E : virtual B, D { };
+struct F : E, virtual C { };
+struct G : virtual F, A { };
+struct H { G g; };
+
+SA(0, sizeof(H) == 24);
+
}