[llvm-branch-commits] [cfe-branch] r105024 - /cfe/branches/Apple/whitney/test/SemaCXX/empty-class-layout.cpp

Daniel Dunbar daniel at zuster.org
Fri May 28 16:06:06 PDT 2010


Author: ddunbar
Date: Fri May 28 18:06:06 2010
New Revision: 105024

URL: http://llvm.org/viewvc/llvm-project?rev=105024&view=rev
Log:
Merge r104839:
--
Author: Anders Carlsson <andersca at mac.com>
Date:   Thu May 27 16:15:06 2010 +0000

    Another empty class layout test.

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=105024&r1=105023&r2=105024&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:06 2010
@@ -103,10 +103,18 @@
 // Test that B::a isn't laid out at offset 0.
 struct Empty { };
 struct A { Empty e; };
-struct B : Empty {
-  A a;
-};
-
+struct B : Empty { A a; };
 SA(0, sizeof(B) == 2);
 
 }
+
+namespace Test4 {
+
+// Test that C::Empty isn't laid out at offset 0.
+struct Empty { };
+struct A : Empty { };
+struct B { A a; };
+struct C : B, Empty { };
+SA(0, sizeof(C) == 2);
+
+}
\ No newline at end of file





More information about the llvm-branch-commits mailing list