Files
clang-p2996/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
Ryosuke Niwa a71f9e6986 [webkit.UncountedLambdaCapturesChecker] Detect protectedThis pattern. (#120528)
In WebKit, we often capture this as Ref or RefPtr in addition to this
itself so that the object lives as long as a capturing lambda stays
alive.

Detect this pattern and treat it as safe. This PR also makes the check
for a lambda being passed as a function argument more robust by handling
CXXBindTemporaryExpr, CXXConstructExpr, and DeclRefExpr referring to the
lambda.
2024-12-19 18:11:28 -08:00

9.0 KiB