diff options
author | Ryosuke Niwa <rniwa@webkit.org> | 2025-04-10 15:26:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-10 15:26:10 -0700 |
commit | c26d097d0c3e0e3924e273c0ec2d1e57192e66c8 (patch) | |
tree | 9c34acb4f677a7c5b178dea3b5be3772b805d127 /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | 80267f81482486977b3bdecf3855fc6a3096f912 (diff) | |
download | llvm-c26d097d0c3e0e3924e273c0ec2d1e57192e66c8.zip llvm-c26d097d0c3e0e3924e273c0ec2d1e57192e66c8.tar.gz llvm-c26d097d0c3e0e3924e273c0ec2d1e57192e66c8.tar.bz2 |
[alpha.webkit.RetainPtrCtorAdoptChecker] Support adopt(cast(copy(~)) (#132316)
This PR adds the support for recognizing calling adoptCF/adoptNS on the
result of a cast operation on the return value of a function which
creates NS or CF types. It also fixes a bug that we weren't reporting
memory leaks when CF types are created without ever calling RetainPtr's
constructor, adoptCF, or adoptNS.
To do this, this PR adds a new mechanism to report a memory leak
whenever create or copy CF functions are invoked unless this CallExpr
has already been visited while validating a call to adoptCF. Also added
an early exit when isOwned returns IsOwnedResult::Skip due to an
unresolved template argument.
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions