Implement C99 6.5.3.4p1, rejecting sizeof(bitfield)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62936 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c
index 5413757..db2daf1 100644
--- a/test/Sema/exprs.c
+++ b/test/Sema/exprs.c
@@ -50,7 +50,10 @@
 // PR3386
 struct f { int x : 4;  float y[]; };
 int test9(struct f *P) {
-  return __alignof(P->x) +  // expected-error {{invalid application of '__alignof' to bitfield}} expected-warning {{extension used}}
-         __alignof(P->y);   // ok. expected-warning {{extension used}}
+  int R;
+  R = __alignof(P->x);  // expected-error {{invalid application of '__alignof' to bitfield}} expected-warning {{extension used}}
+  R = __alignof(P->y);   // ok. expected-warning {{extension used}}
+  R = sizeof(P->x); // expected-error {{invalid application of 'sizeof' to bitfield}}
+  return R;
 }