================
@@ -239,10 +239,19 @@ bool tryToFindPtrOrigin(
 
 bool isASafeCallArg(const Expr *E) {
   assert(E);
+  auto IsCheckedLocalVarOrParam = [](const VarDecl *Decl) {
+    if (auto *Type = Decl->getType().getTypePtrOrNull()) {
+      if (auto *CXXRD = Type->getAsCXXRecordDecl()) {
+        if (isWeakPtr(CXXRD))
+          return false;
+      }
+    }
----------------
steakhal wrote:

```suggestion
    if (auto *CXXRD = Decl->getType()->getAsCXXRecordDecl()) {
      if (isWeakPtr(CXXRD))
        return false;
    }
```

https://github.com/llvm/llvm-project/pull/184563
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to