[clang] [clang][Analyzer] Fix error path of builtin overflow (PR #136345)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 20 05:23:01 PDT 2025


================
@@ -194,30 +187,28 @@ void BuiltinFunctionChecker::handleOverflowBuiltin(const CallEvent &Call,
   SVal RetVal = SVB.evalBinOp(State, Op, Arg1, Arg2, ResultType);
 
   auto [Overflow, NotOverflow] = checkOverflow(C, RetValMax, ResultType);
-  if (NotOverflow) {
-    ProgramStateRef StateNoOverflow = State->BindExpr(
-        CE, C.getLocationContext(), SVB.makeTruthVal(false, BoolTy));
+  auto initializeState = [&](bool isOverflow) {
----------------
steakhal wrote:

Llvm style uses UpperCamelCase local variables.

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


More information about the cfe-commits mailing list