[clang] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (PR #127554)

Rashmi Mudduluru via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 23 21:01:06 PST 2025


================
@@ -332,6 +345,14 @@ class UncheckedCallArgsChecker final : public RawPtrRefCallArgsChecker {
     return isUncheckedPtr(QT);
   }
 
+  bool isSafePtr(const CXXRecordDecl *Record) const final {
+    return isRefCounted(Record) || isCheckedPtr(Record);
+  }
+
+  bool isSafePtrType(const QualType type) const final {
+    return isRefOrCheckedPtrType(type);
+  }
+
----------------
t-rasmud wrote:

Ah, I didn't see they're pure virtual functions. Yeah, that was my intention, move them so we don't have to define them repeatedly.

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


More information about the cfe-commits mailing list