@@ -20008,11 +20008,10 @@ bool Sema::IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val,
2000820008 return !(FlagMask & Val) || (AllowMask && !(FlagMask & ~Val));
2000920009}
2001020010
20011- bool Sema::ComputeBestEnumProperties(ASTContext &Context, bool isPacked,
20012- unsigned NumNegativeBits,
20013- unsigned NumPositiveBits,
20014- QualType &BestType,
20015- QualType &BestPromotionType) {
20011+ bool Sema::ComputeBestEnumTypes(ASTContext &Context, bool isPacked,
20012+ unsigned NumNegativeBits,
20013+ unsigned NumPositiveBits, QualType &BestType,
20014+ QualType &BestPromotionType) {
2001620015 unsigned IntWidth = Context.getTargetInfo().getIntWidth();
2001720016 unsigned CharWidth = Context.getTargetInfo().getCharWidth();
2001820017 unsigned ShortWidth = Context.getTargetInfo().getShortWidth();
@@ -20181,8 +20180,8 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange,
2018120180 BestWidth = Context.getIntWidth(BestType);
2018220181 } else {
2018320182 bool EnumTooLarge =
20184- ComputeBestEnumProperties (Context, Packed, NumNegativeBits,
20185- NumPositiveBits, BestType, BestPromotionType);
20183+ ComputeBestEnumTypes (Context, Packed, NumNegativeBits, NumPositiveBits ,
20184+ BestType, BestPromotionType);
2018620185 BestWidth = Context.getIntWidth(BestType);
2018720186 if (EnumTooLarge)
2018820187 Diag(Enum->getLocation(), diag::ext_enum_too_large);
0 commit comments