diff options
Diffstat (limited to 'clang/test/Sema')
-rw-r--r-- | clang/test/Sema/constant-conversion.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/constant-conversion.c b/clang/test/Sema/constant-conversion.c index cacd5968dc0..29571831653 100644 --- a/clang/test/Sema/constant-conversion.c +++ b/clang/test/Sema/constant-conversion.c @@ -7,3 +7,9 @@ void test_6792488(void) { int x = 0x3ff0000000000000U; // expected-warning {{implicit conversion from 'unsigned long' to 'int' changes value from 4607182418800017408 to 0}} } + +void test_7809123(void) { + struct { int i5 : 5; } a; + + a.i5 = 36; // expected-warning {{implicit truncation for 'int' to bitfield changes value from 36 to 4}} +} |