[clang] [clang][Sema] Move computing enum width and type to a separate function (PR #120965)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 2 06:18:40 PST 2025


================
@@ -20008,6 +20008,87 @@ bool Sema::IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val,
   return !(FlagMask & Val) || (AllowMask && !(FlagMask & ~Val));
 }
 
+bool Sema::ComputeBestEnumProperties(ASTContext &Context, EnumDecl *Enum,
+                                     bool is_cpp, bool isPacked,
----------------
Fznamznon wrote:

> EnumDecl can fill it's own BestType and BestPromotionType fields using this function.

I'm afraid it might result in EnumDecl taking more space and I don't think we'd like that. 

https://github.com/llvm/llvm-project/pull/120965


More information about the cfe-commits mailing list