[clang] [WebKit checkers] Treat passing of a member variable which is capable of CheckedPtr as safe. (PR #142485)
Ryosuke Niwa via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 6 06:48:46 PDT 2025
================
@@ -32,6 +32,22 @@ static void baz() {
} // namespace call_args_checked
+namespace call_args_member {
+
+void consume(CheckedObj&);
+
+struct WrapperObj {
+ CheckedObj checked;
+ CheckedObj& checkedRef;
+ void foo() {
+ consume(checked);
----------------
rniwa wrote:
Yes, that is valid since the caller of `foo` will keep WO alive for the duration of the function invocation.
https://github.com/llvm/llvm-project/pull/142485
More information about the cfe-commits
mailing list