[clang] [alpha.webkit.RetainPtrCtorAdoptChecker] Recognize mutableCopy from literal as +1 (PR #132350)

Rashmi Mudduluru via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 8 15:07:19 PDT 2025


================
@@ -97,3 +97,13 @@ void create_member_init() {
 RetainPtr<id> return_bridge_cast() {
   return bridge_cast<CFArrayRef, NSArray>(create_cf_array());
 }
+
+void mutable_copy() {
+  RetainPtr<NSMutableDictionary> mutableArray = adoptNS(@{
+    @"Content-Type": @"text/html",
+  }.mutableCopy);
+}
----------------
t-rasmud wrote:

This is a question for my understanding: Is the behavior expected to be same/different for `CFArrayCreateMutable`?

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


More information about the cfe-commits mailing list