[llvm-branch-commits] [cfe-branch] r105023 - /cfe/branches/Apple/whitney/test/SemaCXX/empty-class-layout.cpp
Daniel Dunbar
daniel at zuster.org
Fri May 28 16:06:03 PDT 2010
Author: ddunbar
Date: Fri May 28 18:06:03 2010
New Revision: 105023
URL: http://llvm.org/viewvc/llvm-project?rev=105023&view=rev
Log:
Merge r104838:
--
Author: Anders Carlsson <andersca at mac.com>
Date: Thu May 27 16:07:49 2010 +0000
Add more empty class layout tests.
Modified:
cfe/branches/Apple/whitney/test/SemaCXX/empty-class-layout.cpp
Modified: cfe/branches/Apple/whitney/test/SemaCXX/empty-class-layout.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/SemaCXX/empty-class-layout.cpp?rev=105023&r1=105022&r2=105023&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/test/SemaCXX/empty-class-layout.cpp (original)
+++ cfe/branches/Apple/whitney/test/SemaCXX/empty-class-layout.cpp Fri May 28 18:06:03 2010
@@ -84,3 +84,29 @@
SA(0, sizeof(F) == 24);
}
+
+namespace Test2 {
+
+// Test that B::a isn't laid out at offset 0.
+struct Empty { };
+struct A : Empty { };
+struct B : Empty {
+ A a;
+};
+
+SA(0, sizeof(B) == 2);
+
+}
+
+namespace Test3 {
+
+// Test that B::a isn't laid out at offset 0.
+struct Empty { };
+struct A { Empty e; };
+struct B : Empty {
+ A a;
+};
+
+SA(0, sizeof(B) == 2);
+
+}
More information about the llvm-branch-commits
mailing list