You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (#128641)
Add a new WebKit checker for member variables and instance variables of
NS and CF types. A member variable or instance variable to a CF type
should be RetainPtr regardless of whether ARC is enabled or disabled,
and that of a NS type should be RetainPtr when ARC is disabled.
Copy file name to clipboardExpand all lines: clang/docs/analyzer/checkers.rst
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3522,6 +3522,19 @@ Raw pointers and references to an object which supports CheckedPtr or CheckedRef
3522
3522
3523
3523
See `WebKit Guidelines for Safer C++ Programming <https://github.com/WebKit/WebKit/wiki/Safer-CPP-Guidelines>`_ for details.
3524
3524
3525
+
alpha.webkit.NoUnretainedMemberChecker
3526
+
""""""""""""""""""""""""""""""""""""""""
3527
+
Raw pointers and references to a NS or CF object can't be used as class members or ivars. Only RetainPtr is allowed for CF types regardless of whether ARC is enabled or disabled. Only RetainPtr is allowed for NS types when ARC is disabled.
3528
+
3529
+
.. code-block:: cpp
3530
+
3531
+
struct Foo {
3532
+
NSObject *ptr; // warn
3533
+
// ...
3534
+
};
3535
+
3536
+
See `WebKit Guidelines for Safer C++ Programming <https://github.com/WebKit/WebKit/wiki/Safer-CPP-Guidelines>`_ for details.
3537
+
3525
3538
alpha.webkit.UnretainedLambdaCapturesChecker
3526
3539
""""""""""""""""""""""""""""""""""""""""""""
3527
3540
Raw pointers and references to NS or CF types can't be captured in lambdas. Only RetainPtr is allowed for CF types regardless of whether ARC is enabled or disabled, and only RetainPtr is allowed for NS types when ARC is disabled.
0 commit comments