Implement bit-field promotion rules for C99. Fixes PR3500.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70571 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/bitfield.c b/test/Sema/bitfield.c
index 7a7f96c..e81b802 100644
--- a/test/Sema/bitfield.c
+++ b/test/Sema/bitfield.c
@@ -25,3 +25,7 @@
   unsigned : -2;  // expected-error {{anonymous bit-field has negative width (-2)}}
   float : 12;     // expected-error {{anonymous bit-field has non-integral type 'float'}}
 };
+
+struct b {unsigned x : 2;} x;
+__typeof__(x.x+1) y;
+int y;