mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-04 08:16:49 +00:00
[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
This commit is contained in:
parent
f04fd0b330
commit
96afec1def
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user