]> granicus.if.org Git - clang/commitdiff
Don't update empty field subobjects for bitfields. Fixes PR8519.
authorAnders Carlsson <andersca@mac.com>
Mon, 1 Nov 2010 15:14:51 +0000 (15:14 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 1 Nov 2010 15:14:51 +0000 (15:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117921 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/RecordLayoutBuilder.cpp

index c878c25f416578e29c273d1248a5ab3a02dbd121..0fe180d551d236de5b2b3a096fd4b525f291a47e 100644 (file)
@@ -494,7 +494,9 @@ void EmptySubobjectMap::UpdateEmptyFieldSubobjects(const CXXRecordDecl *RD,
   for (CXXRecordDecl::field_iterator I = RD->field_begin(), E = RD->field_end();
        I != E; ++I, ++FieldNo) {
     const FieldDecl *FD = *I;
-    
+    if (FD->isBitField())
+      continue;
+
     CharUnits FieldOffset = Offset + getFieldOffset(Layout, FieldNo);
 
     UpdateEmptyFieldSubobjects(FD, FieldOffset);