[clang] [alpha.webkit.NoUnretainedMemberChecker] Recognize NS_REQUIRES_PROPERTY_DEFINITIONS (PR #141293)
Ziqing Luo via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 5 23:59:06 PDT 2025
================
@@ -174,7 +175,15 @@ class RawPtrRefMemberChecker
if (!PropType)
return;
- auto IsUnsafePtr = isUnsafePtr(QT);
+ if (const ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(CD)) {
+ if (!RTC || !RTC->defaultSynthProperties() ||
+ ID->isObjCRequiresPropertyDefs())
+ return;
+ }
+
+ bool ignoreARC =
----------------
ziqingluo-90 wrote:
As a reader unfamiliar with the checker, I'd appreciate some comments on `ignoreARC`. Specifically, 1) why to `ignoreARC` for non-read-only and `assign` `PD`s; and 2) does `ignoreARC` make it "more likely" an unsafe ptr?
https://github.com/llvm/llvm-project/pull/141293
More information about the cfe-commits
mailing list