ConstStructBuilder: fix offset math for base classes so it works correctly in general.  Found by inspection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153720 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/const-init-cxx11.cpp b/test/CodeGenCXX/const-init-cxx11.cpp
index 8d92b81..c6250c6 100644
--- a/test/CodeGenCXX/const-init-cxx11.cpp
+++ b/test/CodeGenCXX/const-init-cxx11.cpp
@@ -78,6 +78,11 @@
   struct Test2 : X<E,0>, X<E,1>, X<E,2>, X<E,3> {};
   // CHECK: @_ZN9BaseClass2t2E = constant {{.*}} undef
   extern constexpr Test2 t2 = Test2();
+
+  struct __attribute((packed)) PackedD { double y = 2; };
+  struct Test3 : C, PackedD { constexpr Test3() {} };
+  // CHECK: @_ZN9BaseClass2t3E = constant <{ i8, double }> <{ i8 1, double 2.000000e+00 }>
+  extern constexpr Test3 t3 = Test3();
 }
 
 namespace Array {