================
@@ -144,7 +144,9 @@ TaggedUnionMemberCountCheck::getNumberOfEnumValues(const
EnumDecl *ED) {
if (EnableCountingEnumHeuristic && LastEnumConstant &&
isCountingEnumLikeName(LastEnumConstant->getName()) &&
- (LastEnumConstant->getInitVal() == (EnumValues.size() - 1))) {
+ llvm::APSInt::compareValues(LastEnumConstant->getInitVal(),
----------------
vbvictor wrote:
Could use `llvm::APSInt::isSameValue` to avoid strange formatting formatting
https://github.com/llvm/llvm-project/pull/147048
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits