[all-commits] [llvm/llvm-project] 2c3140: [alpha.webkit.UnretainedLambdaCapturesChecker] Add...
Ryosuke Niwa via All-commits
all-commits at lists.llvm.org
Wed Apr 9 11:52:58 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2c31403f4f301214cb87e929c4d032bd2f4617f4
https://github.com/llvm/llvm-project/commit/2c31403f4f301214cb87e929c4d032bd2f4617f4
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2025-04-09 (Wed, 09 Apr 2025)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
M clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLambdaCapturesChecker.cpp
M clang/test/Analysis/Checkers/WebKit/unretained-lambda-captures-arc.mm
M clang/test/Analysis/Checkers/WebKit/unretained-lambda-captures.mm
Log Message:
-----------
[alpha.webkit.UnretainedLambdaCapturesChecker] Add the support for protectedSelf (#132518)
This PR adds the support for treating capturing of "self" as safe if the
lambda simultaneously captures "protectedSelf", which is a RetainPtr of
"self".
This PR also fixes a bug that the checker wasn't generating a warning
when "self" is implicitly captured. Note when "self" is implicitly
captured, we use the lambda's getBeginLoc as a fallback source location.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list