[clang] [alpha.webkit.UncountedCallArgsChecker] Don't assume local variables are safe & treat guarded local variable as safe function arguments (PR #82305)

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 20:42:56 PST 2024


================
@@ -27,6 +28,13 @@ tryToFindPtrOrigin(const Expr *E, bool StopAtFirstRefCountedObj) {
       E = tempExpr->getSubExpr();
       continue;
     }
+    if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {
+      auto *decl = DRE->getFoundDecl();
----------------
haoNoQ wrote:

Is this really better than `getDecl()`? For variables I don't think there could be many of those, and even if there are, it's probably easier to deal with the default one.

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


More information about the cfe-commits mailing list