Skip to content

Commit 7b710f0

Browse files
committed
test(clang-cl): bitfield & struct padding
1 parent b4e2081 commit 7b710f0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

clang/test/Driver/windows-Wpadded.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// RUN: %clang_cl -Wpadded -Wno-msvc-not-found -fsyntax-only -- %s 2>&1 | FileCheck -check-prefix=WARN %s
2+
3+
struct Foo {
4+
int b : 1;
5+
char a;
6+
};
7+
8+
int main () {Foo foo;}
9+
10+
// WARN: warning: padding struct 'Foo' with 31 bits to align 'a'
11+
// WARN: warning: padding size of 'Foo' with 3 bytes to alignment boundary

0 commit comments

Comments
 (0)