manas added a comment. Regarding the tweakings in `constant-folding.c`, I have refrained from using cases which were resulting in `UNKNOWN` assertions as they were the primary reason for constraints being propagated.
================ Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1075-1076 + /// LHSOpd binop RHSOpd == Result, where binop is any binary operation + bool hasOverflowed(llvm::APSInt LHSOpd, llvm::APSInt RHSOpd, + llvm::APSInt &Result, QualType T) { + llvm::APSInt Zero = ValueFactory.getAPSIntType(T).getZeroValue(); ---------------- We should have these specific functions for other BO as well. Because they will lead us to reason about when `Operand1 binop Operand2` can overflow or not. I was thinking in the direction of having a simpler class which works for this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103440/new/ https://reviews.llvm.org/D103440 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits