Skip to content

Commit e145662

Browse files
author
einvbri
committed
Address review comments
1 parent 4065ca6 commit e145662

File tree

1 file changed

+7
-7
lines changed
  • clang/include/clang/StaticAnalyzer/Core/PathSensitive

1 file changed

+7
-7
lines changed

clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -577,16 +577,16 @@ class SMTConv {
577577
// Get the bit size and round up to next power of 2, max char size
578578
if (Ty.isNull()) {
579579
unsigned CharTypeSize = Ctx.getTypeSize(Ctx.CharTy);
580-
unsigned pow2DestWidth =
580+
unsigned Pow2DestWidth =
581581
std::max(llvm::bit_ceil(Int.getBitWidth()), CharTypeSize);
582-
Ty = Ctx.getIntTypeForBitwidth(pow2DestWidth, Int.isSigned());
582+
Ty = Ctx.getIntTypeForBitwidth(Pow2DestWidth, Int.isSigned());
583583
}
584584
return Ty;
585585
}
586586

587-
static inline bool IsPower2(unsigned bits) {
588-
return bits > 0 && (bits & (bits - 1)) == 0;
589-
}
587+
// static inline bool IsPower2(unsigned bits) {
588+
// return bits > 0 && (bits & (bits - 1)) == 0;
589+
// }
590590

591591
// Get the QualTy for the input APSInt, and fix it if it has a bitwidth of 1.
592592
static inline std::pair<llvm::APSInt, QualType>
@@ -601,8 +601,8 @@ class SMTConv {
601601
if (APSIntBitwidth == 1 && Ty.isNull()) {
602602
NewInt = Int.extend(Ctx.getTypeSize(Ctx.BoolTy));
603603
Ty = getAPSIntType(Ctx, NewInt);
604-
} else if (!IsPower2(APSIntBitwidth) && !getAPSIntType(Ctx, Int).isNull()) {
605-
Ty = getAPSIntType(Ctx, Int);
604+
} else if (!llvm::isPowerOf2_32(APSIntBitwidth) &&
605+
!getAPSIntType(Ctx, Int).isNull()) {
606606
NewInt = Int.extend(Ctx.getTypeSize(Ty));
607607
} else
608608
NewInt = Int;

0 commit comments

Comments
 (0)