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. (llvm#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
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3479,6 +3479,19 @@ Raw pointers and references to an object which supports CheckedPtr or CheckedRef
3479
3479
3480
3480
See `WebKit Guidelines for Safer C++ Programming <https://github.com/WebKit/WebKit/wiki/Safer-CPP-Guidelines>`_ for details.
3481
3481
3482
+
alpha.webkit.NoUnretainedMemberChecker
3483
+
""""""""""""""""""""""""""""""""""""""""
3484
+
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.
3485
+
3486
+
.. code-block:: cpp
3487
+
3488
+
struct Foo {
3489
+
NSObject *ptr; // warn
3490
+
// ...
3491
+
};
3492
+
3493
+
See `WebKit Guidelines for Safer C++ Programming <https://github.com/WebKit/WebKit/wiki/Safer-CPP-Guidelines>`_ for details.
3494
+
3482
3495
alpha.webkit.UnretainedLambdaCapturesChecker
3483
3496
""""""""""""""""""""""""""""""""""""""""""""
3484
3497
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