[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 12:59:45 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:

But perhaps that's better accessed via an explicit accessor which returns the member variable. I added a `this` check for this PR.

https://github.com/llvm/llvm-project/pull/142485


More information about the cfe-commits mailing list