[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:54 PDT 2025


================
@@ -577,16 +577,16 @@ class SMTConv {
     // Get the bit size and round up to next power of 2, max char size
     if (Ty.isNull()) {
       unsigned CharTypeSize = Ctx.getTypeSize(Ctx.CharTy);
-      unsigned pow2DestWidth =
+      unsigned Pow2DestWidth =
           std::max(llvm::bit_ceil(Int.getBitWidth()), CharTypeSize);
-      Ty = Ctx.getIntTypeForBitwidth(pow2DestWidth, Int.isSigned());
+      Ty = Ctx.getIntTypeForBitwidth(Pow2DestWidth, Int.isSigned());
     }
     return Ty;
   }
 
-  static inline bool IsPower2(unsigned bits) {
-    return bits > 0 && (bits & (bits - 1)) == 0;
-  }
+  // static inline bool IsPower2(unsigned bits) {
----------------
NagyDonat wrote:

Don't forget to delete this commented out block.

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


More information about the cfe-commits mailing list