[clang] [clang][analyzer] Correct SMT Layer for _BitInt cases refutations (PR #143310)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 10 10:56:55 PDT 2025
================
@@ -601,8 +601,8 @@ class SMTConv {
if (APSIntBitwidth == 1 && Ty.isNull()) {
NewInt = Int.extend(Ctx.getTypeSize(Ctx.BoolTy));
Ty = getAPSIntType(Ctx, NewInt);
- } else if (!IsPower2(APSIntBitwidth) && !getAPSIntType(Ctx, Int).isNull()) {
- Ty = getAPSIntType(Ctx, Int);
+ } else if (!llvm::isPowerOf2_32(APSIntBitwidth) &&
+ !getAPSIntType(Ctx, Int).isNull()) {
----------------
NagyDonat wrote:
In the condition `getAPSIntType(Ctx, Int)` is still needlessly complex -- you can write `Ty` instead of it.
https://github.com/llvm/llvm-project/pull/143310
More information about the cfe-commits
mailing list