We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f61d83 commit bf97ad8Copy full SHA for bf97ad8
clang/lib/AST/ASTContext.cpp
@@ -7118,12 +7118,15 @@ QualType ASTContext::isPromotableBitField(Expr *E) const {
7118
// We perform that promotion here to match GCC and C++.
7119
// FIXME: C does not permit promotion of an enum bit-field whose rank is
7120
// greater than that of 'int'. We perform that promotion to match GCC.
7121
- if (BitWidth < IntSize)
+ if (BitWidth < IntSize) {
7122
+ if (getLangOpts().MicrosoftExt || getLangOpts().MSVCCompat)
7123
+ return {};
7124
#ifdef _WIN32
7125
return {};
7126
#else
7127
return IntTy;
7128
#endif
7129
+ }
7130
7131
if (BitWidth == IntSize)
7132
return FT->isSignedIntegerType() ? IntTy : UnsignedIntTy;
0 commit comments