[clang] [WebKit checkers] Treat passing of a member variable which is capable of CheckedPtr as safe. (PR #142485)
Ziqing Luo via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 5 22:08:04 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);
----------------
ziqingluo-90 wrote:
do you need to check that the `checked` expr here is in fact `this->checked`?
In other words, is the example below valid?
```
struct WrapperObj {
CheckedObj checked;
void foo(WrapperObj *WO) {
consume(WO->checked); // I see no warn here
}
};
```
https://github.com/llvm/llvm-project/pull/142485
More information about the cfe-commits
mailing list