diff options
author | Anders Carlsson <andersca@mac.com> | 2010-05-27 16:15:06 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-05-27 16:15:06 +0000 |
commit | bff9eb73031494a7a728ced66d1de150f28fd99f (patch) | |
tree | 42c8f5a5ea2e7b87eb1c61f2364b70ed81de2252 /test/SemaCXX/empty-class-layout.cpp | |
parent | 1a8d1511cde781787550576306085bd9300feb5a (diff) |
Another empty class layout test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104839 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/empty-class-layout.cpp')
-rw-r--r-- | test/SemaCXX/empty-class-layout.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/test/SemaCXX/empty-class-layout.cpp b/test/SemaCXX/empty-class-layout.cpp index 7d4e66c45f..bc2d58abd9 100644 --- a/test/SemaCXX/empty-class-layout.cpp +++ b/test/SemaCXX/empty-class-layout.cpp @@ -103,10 +103,18 @@ namespace Test3 { // 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 |