[clang] [alpha.webkit.UncountedLocalVarsChecker] Support obtaining guardian's value via operator* (PR #219647)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 29 04:16:08 PDT 2026


================
@@ -89,6 +89,11 @@ struct GuardianVisitor : DynamicRecursiveASTVisitor {
       return false;
     if (isPtrConversion(Callee))
       return true;
+    if (auto *Method = dyn_cast<CXXMethodDecl>(Callee)) {
+      auto IsGetter = isGetterOfSafePtr(Method);
+      if (IsGetter && *IsGetter)
----------------
steakhal wrote:

```suggestion
      if (isGetterOfSafePtr(Method).value_or(false))
```

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


More information about the cfe-commits mailing list