================ @@ -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()) ---------------- vabridgers wrote:
@steakhal , because I get this error if I follow the precise suggestion. So I modified a little bit to meet what I thought you wanted. ``` In file included from <base>/clang/lib/StaticAnalyzer/Core/Z3CrosscheckVisitor.cpp:18: <base>/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h: In static member function ‘static clang::QualType clang::ento::SMTConv::getAPSIntType(clang::ASTContext&, const llvm::APSInt&)’: <base>/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h:585:5: error: ‘Ty’ was not declared in this scope 585 | Ty = Ctx.getIntTypeForBitwidth(Pow2DestWidth, Int.isSigned()); | ^~ ninja: build stopped: subcommand failed. ``` 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