steakhal added inline comments.
================ Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:335 - NonLoc makeIntValWithPtrWidth(uint64_t integer, bool isUnsigned) { - return nonloc::ConcreteInt( - BasicVals.getIntWithPtrWidth(integer, isUnsigned)); + NonLoc makeIntValWithPtrWidth(QualType ptrType, uint64_t integer) { + return nonloc::ConcreteInt(BasicVals.getValue(integer, ptrType)); ---------------- This function should have a different name. Probbaly the `makeIntValWithWidth()` is a better alternative. Ah but even this is far less than ideal. ================ Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2570 + State, TotalSize.castAs<DefinedOrUnknownSVal>(), + svalBuilder.makeIntValWithPtrWidth(Arg1->getType(), 0)); ---------------- We peobably wanted to use a different tspe for this expressuon. 'getArrayIndexType()' is a better fit IMO. We shall see. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120134/new/ https://reviews.llvm.org/D120134 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits