================ @@ -144,7 +144,8 @@ TaggedUnionMemberCountCheck::getNumberOfEnumValues(const EnumDecl *ED) { if (EnableCountingEnumHeuristic && LastEnumConstant && isCountingEnumLikeName(LastEnumConstant->getName()) && - (LastEnumConstant->getInitVal() == (EnumValues.size() - 1))) { + (LastEnumConstant->getInitVal() == + llvm::APSInt::getUnsigned(EnumValues.size() - 1u))) { ---------------- vbvictor wrote:
Should this be `llvm::APSInt::get` (signed getter)? The previous overload would be: https://github.com/llvm/llvm-project/blob/ad20dc0a87fc34666dcd75390c149d5ea55a0fbd/llvm/include/llvm/ADT/APSInt.h#L189-L191 Which uses `llvm::APSInt::get` internally. https://github.com/llvm/llvm-project/pull/147048 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits