summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/bitfield.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/bitfield.c')
-rw-r--r--clang/test/Sema/bitfield.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Sema/bitfield.c b/clang/test/Sema/bitfield.c
index ba8460d3f6c..810dc798eaa 100644
--- a/clang/test/Sema/bitfield.c
+++ b/clang/test/Sema/bitfield.c
@@ -63,7 +63,8 @@ typedef unsigned Unsigned;
typedef signed Signed;
struct Test5 { unsigned n : 2; } t5;
-typedef __typeof__(t5.n) Unsigned; // Bitfield is unsigned
+// Bitfield is unsigned
+struct Test5 sometest5 = {-1}; // expected-warning {{implicit truncation from 'int' to bitfield changes value from -1 to 3}}
typedef __typeof__(+t5.n) Signed; // ... but promotes to signed.
typedef __typeof__(t5.n + 0) Signed; // Arithmetic promotes.
OpenPOWER on IntegriCloud