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

Ryosuke Niwa via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 22 17:19:11 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);
+  }
+
----------------
rniwa wrote:

These are declared as pure virtual functions in `RawPtrRefCallArgsChecker`. Do you mean move one of the definitions to the base class so that some of these concrete subclasses won't have to define them??

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


More information about the cfe-commits mailing list