Remove possible trailing padding from aligned_storage. Patch from Yiran Wang

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@248309 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier 2015-09-22 18:37:03 +00:00
parent bf94e48216
commit 514c831504

View File

@ -1190,7 +1190,7 @@ struct _LIBCPP_TYPE_VIS_ONLY aligned_storage
union type
{
_Aligner __align;
unsigned char __data[_Len];
unsigned char __data[(_Len + _Align - 1)/_Align * _Align];
};
};
@ -1205,7 +1205,7 @@ struct _LIBCPP_TYPE_VIS_ONLY aligned_storage<_Len, n>\
{\
struct _ALIGNAS(n) type\
{\
unsigned char __lx[_Len];\
unsigned char __lx[(_Len + n - 1)/n * n];\
};\
}