File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
clang/test/Analysis/Checkers/WebKit Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ @implementation SomeObj {
4545 SomeObj *_other;
4646}
4747
48+ + (SomeObj *)sharedInstance {
49+ return nil ;
50+ }
51+
4852- (instancetype )_init {
4953 self = [super init ];
5054 _number = nil ;
@@ -61,6 +65,10 @@ - (SomeObj *)mutableCopy {
6165 return copy;
6266}
6367
68+ - (BOOL )isEqual : (SomeObj *)other {
69+ return self.value == other.value && self.next == other.next && _other == other.other ;
70+ }
71+
6472- (SomeObj *)copyWithValue : (int )value {
6573 auto *copy = [[SomeObj alloc ] init ];
6674 [copy setValue: _number];
Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ - (SomeObj *)mutableCopy {
7474 return copy;
7575}
7676
77+ - (BOOL )isEqual : (SomeObj *)other {
78+ return self.value == other.value && self.next == other.next && _other == other.other ;
79+ }
80+
7781- (SomeObj *)copyWithValue : (int )value {
7882 auto *copy = [[SomeObj alloc ] init ];
7983 // expected-warning@-1{{The return value is +1 and results in a memory leak [alpha.webkit.RetainPtrCtorAdoptChecker]}}
You can’t perform that action at this time.
0 commit comments