[clang] [NFC][analyzer] Refactor Environment to map Expr to SVal instead of Stmt to SVal (PR #193295)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 22 02:14:35 PDT 2026


================
@@ -949,7 +949,10 @@ class ReturnVisitor : public TrackingBugReporterVisitor {
     // Okay, we're at the right return statement, but do we have the return
     // value available?
     ProgramStateRef State = N->getState();
-    SVal V = State->getSVal(Ret, CalleeSFC);
+    const Expr *RV = Ret->getRetValue();
+    if (!RV)
+      return nullptr;
----------------
steakhal wrote:

Yep, this is correct. Great!

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


More information about the cfe-commits mailing list