diff options
author | Warren Hunt <whunt@google.com> | 2013-12-12 23:23:28 +0000 |
---|---|---|
committer | Warren Hunt <whunt@google.com> | 2013-12-12 23:23:28 +0000 |
commit | 96afec1defa2f5483e7f583ea4d15b94ccb7eb2a (patch) | |
tree | 187d31ca7ef88b33fe9552daafec88299b7d4a02 /clang/lib/Sema/SemaDecl.cpp | |
parent | f04fd0b330f5750de4285765b2c4d1011b3e11b9 (diff) | |
download | bcm5719-llvm-96afec1defa2f5483e7f583ea4d15b94ccb7eb2a.tar.gz bcm5719-llvm-96afec1defa2f5483e7f583ea4d15b94ccb7eb2a.zip |
[ms-abi] Fixing bitfields sema arror for ms-mode
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).
llvm-svn: 197186
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index aa2104e0aac..6eb8955dbca 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -11309,7 +11309,8 @@ ExprResult Sema::VerifyBitField(SourceLocation FieldLoc, 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() |