Skip to content

Commit 9c81486

Browse files
committed
Address review comments
1 parent 572a81a commit 9c81486

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

clang/docs/analyzer/checkers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3489,7 +3489,7 @@ See `WebKit Guidelines for Safer C++ Programming <https://github.com/WebKit/WebK
34893489
34903490
alpha.webkit.NoUnretainedMemberChecker
34913491
""""""""""""""""""""""""""""""""""""""""
3492-
Raw pointers and references to a NS or CF object can't be used as class members or ivars. Only RetainPtr is allowed.
3492+
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.
34933493
34943494
.. code-block:: cpp
34953495

clang/test/Analysis/Checkers/WebKit/unretained-members.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111

1212
[[clang::suppress]]
1313
SomeObj* a_suppressed = nullptr;
14+
// No warning.
1415

1516
protected:
1617
RetainPtr<SomeObj> b;
18+
// No warning.
1719

1820
public:
1921
SomeObj* c = nullptr;
@@ -37,6 +39,7 @@ void forceTmplToInstantiate(FooTmpl<SomeObj, CFMutableArrayRef>) {}
3739
struct [[clang::suppress]] FooSuppressed {
3840
private:
3941
SomeObj* a = nullptr;
42+
// No warning.
4043
};
4144

4245
}

0 commit comments

Comments
 (0)