The check for bitfields that are longer than their base type needed to
be checked in microsoft mode (cl.exe does not support the C++ extnetion
for bitfields longer than their type).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197186
91177308-0d34-0410-b5e6-
96231b3b80d8
if (!FieldTy->isDependentType()) {
uint64_t TypeSize = Context.getTypeSize(FieldTy);
if (Value.getZExtValue() > TypeSize) {
- if (!getLangOpts().CPlusPlus || IsMsStruct) {
+ if (!getLangOpts().CPlusPlus || IsMsStruct ||
+ Context.getTargetInfo().getCXXABI().isMicrosoft()) {
if (FieldName)
return Diag(FieldLoc, diag::err_bitfield_width_exceeds_type_size)
<< FieldName << (unsigned)Value.getZExtValue()