[clang] [WebKit Checkers] Trace through temporaries in tryToFindPtrOrigin (PR #224877)

Ryosuke Niwa via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 19 21:31:31 PDT 2026


================
@@ -352,9 +353,12 @@ class RawPtrRefLocalVarsChecker
           return Model->isSafeDecl(D, BR->getSourceManager());
         },
         [&](const clang::Expr *InitArgOrigin, bool IsSafe) {
-          if (!InitArgOrigin || IsSafe)
+          if (!InitArgOrigin)
             return true;
 
+          if (IsSafe)
+            return !CrossedShortLivedTemporary;
----------------
rniwa wrote:

Can't we make this an argument of the callback?

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


More information about the cfe-commits mailing list