[cfe-commits] r104839 - /cfe/trunk/test/SemaCXX/empty-class-layout.cpp
Anders Carlsson
andersca at mac.com
Thu May 27 09:15:06 PDT 2010
Author: andersca
Date: Thu May 27 11:15:06 2010
New Revision: 104839
URL: http://llvm.org/viewvc/llvm-project?rev=104839&view=rev
Log:
Another empty class layout test.
Modified:
cfe/trunk/test/SemaCXX/empty-class-layout.cpp
Modified: cfe/trunk/test/SemaCXX/empty-class-layout.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/empty-class-layout.cpp?rev=104839&r1=104838&r2=104839&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/empty-class-layout.cpp (original)
+++ cfe/trunk/test/SemaCXX/empty-class-layout.cpp Thu May 27 11:15: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 cfe-commits
mailing list