Skip to content

Commit f6c29bc

Browse files
committed
Rename the funtion
1 parent c41ddb9 commit f6c29bc

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

clang/include/clang/Sema/Sema.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3988,10 +3988,9 @@ class Sema final : public SemaBase {
39883988
const ParsedAttributesView &Attrs,
39893989
SourceLocation EqualLoc, Expr *Val);
39903990

3991-
bool ComputeBestEnumProperties(ASTContext &Context, bool isPacked,
3992-
unsigned NumNegativeBits,
3993-
unsigned NumPositiveBits, QualType &BestType,
3994-
QualType &BestPromotionType);
3991+
bool ComputeBestEnumTypes(ASTContext &Context, bool isPacked,
3992+
unsigned NumNegativeBits, unsigned NumPositiveBits,
3993+
QualType &BestType, QualType &BestPromotionType);
39953994
void ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange,
39963995
Decl *EnumDecl, ArrayRef<Decl *> Elements, Scope *S,
39973996
const ParsedAttributesView &Attr);

clang/lib/Sema/SemaDecl.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)