================ @@ -570,23 +572,35 @@ class SMTConv { // TODO: Refactor to put elsewhere static inline QualType getAPSIntType(ASTContext &Ctx, const llvm::APSInt &Int) { - return Ctx.getIntTypeForBitwidth(Int.getBitWidth(), Int.isSigned()); + QualType Ty; + if (!(Ty = Ctx.getIntTypeForBitwidth(Int.getBitWidth(), Int.isSigned())) + .isNull()) ---------------- NagyDonat wrote:
I feel that the init-if would be really ugly in this particular case because the initializer expression is far too long. (I understand that it improves readability by highlighting the limited scope of the variable -- I think this is significantly outweighed by the complicated condition which is hard to parse at glance. Also, this is a small function, so the scope reduction isn't too significant.) https://github.com/llvm/llvm-project/pull/143310 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits