]> granicus.if.org Git - clang/commitdiff
Initialize NextOffset correctly, otherwise tight layout fails for
authorDaniel Dunbar <daniel@zuster.org>
Mon, 4 May 2009 20:52:37 +0000 (20:52 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 4 May 2009 20:52:37 +0000 (20:52 +0000)
empty classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70905 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/RecordLayout.h

index 57adc8a555dca4a42a1ffcf31ad9d705e89a9f6e..e764cf8a61a35acf1167888dc0dd4ae5b8e908c8 100644 (file)
@@ -36,7 +36,7 @@ class ASTRecordLayout {
   friend class ASTContext;
 
   ASTRecordLayout(uint64_t S = 0, unsigned A = 8) 
-    : Size(S), Alignment(A), FieldCount(0), NextOffset(0) {}
+    : Size(S), Alignment(A), FieldCount(0), NextOffset(S) {}
   ~ASTRecordLayout() {
     delete [] FieldOffsets;
   }