Two fixes:
- Make sure ObjCIvarDecl propagates the bitfield width.
- RewriteObjC::SynthesizeIvarOffsetComputation(): Avoid using the __OFFSETOF__ mumbo jumbo for bitfields (since it isn't legal C). This fixes <rdar://problem/5986079> clang ObjC rewriter: bitfields and ivar access don't mix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53694 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index f4d9da6..00c73ea 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1946,7 +1946,8 @@
     InvalidDecl = true;
   }
   
-  ObjCIvarDecl *NewID = ObjCIvarDecl::Create(Context, Loc, II, T);
+  ObjCIvarDecl *NewID = ObjCIvarDecl::Create(Context, Loc, II, T,
+                                             (Expr *)BitfieldWidth);
   
   ProcessDeclAttributes(NewID, D);