[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #128586)
Ryosuke Niwa via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 24 14:29:24 PST 2025
================
@@ -28,6 +29,15 @@ bool tryToFindPtrOrigin(
std::function<bool(const clang::QualType)> isSafePtrType,
std::function<bool(const clang::Expr *, bool)> callback) {
while (E) {
+ if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {
+ auto *ValDecl = DRE->getDecl();
+ auto QT = ValDecl->getType();
+ auto ValName = ValDecl->getName();
+ if (ValDecl && (ValName.starts_with('k') || ValName.starts_with("_k")) &&
----------------
rniwa wrote:
This ignores kCF~ and _kCF constants.
https://github.com/llvm/llvm-project/pull/128586
More information about the cfe-commits
mailing list