xref: /llvm-project/clang/test/CodeGenCXX/class-layout.cpp (revision 220bf4fc5a94a01a6e429def403da1bbe537bb2a)
1 // RUN: clang-cc %s -emit-llvm -o - | FileCheck %s
2 
3 // An extra byte shoudl be allocated for an empty class.
4 // CHECK: %struct.A = type { i8 }
5 struct A { } a;
6 
7 // No need to add tail padding here.
8 // CHECK: %struct.B = type { i8*, i32 }
9 struct B { void *a; int b; } b;
10