diff options
Diffstat (limited to 'clang/test/Sema/constant-conversion.c')
-rw-r--r-- | clang/test/Sema/constant-conversion.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Sema/constant-conversion.c b/clang/test/Sema/constant-conversion.c index 5f734f3649d..958621266b7 100644 --- a/clang/test/Sema/constant-conversion.c +++ b/clang/test/Sema/constant-conversion.c @@ -13,3 +13,8 @@ void test_7809123(void) { a.i5 = 36; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 36 to 4}} } + +void test() { + struct { int bit : 1; } a; + a.bit = 1; // shouldn't warn +} |