Lines Matching refs:NSString

18 @interface NSString : NSObject <NSCopying>  interface
21 @interface NSMutableString : NSString
42 @interface NSStringArray : NSArray<NSString *>
141 NSSet<NSString *> *stringSet,
142 NSMutableSet<NSString *> *mutStringSet,
145 MutableSetOfArrays<NSString *> *mutStringArraySet,
149 NSArray<NSString *> *stringArray,
150 NSArray<__kindof NSString *> *kindofStringArray,
153 ip = [stringSet firstObject]; // expected-warning{{from 'NSString *'}}
154 ip = [mutStringSet firstObject]; // expected-warning{{from 'NSString *'}}
157 ip = [mutStringArraySet firstObject]; // expected-warning{{from 'NSArray<NSString *> *'}}
163 ip = [stringSet findObject:@"blah"]; // expected-warning{{from 'NSString *'}}
166 ip = [NSSet<NSString *> alloc]; // expected-warning{{from 'NSSet<NSString *> *'}}
168 …ip = [MutableSetOfArrays<NSString *> alloc]; // expected-warning{{from 'MutableSetOfArrays<NSStrin…
170 ip = [NSArray<NSString *> array]; // expected-warning{{from 'NSArray<NSString *> *'}}
171 ip = [NSArray<NSString *><NSCopying> array]; // expected-warning{{from 'NSArray<NSString *> *'}}
173 …ip = [[NSMutableArray<NSString *> alloc] init]; // expected-warning{{from 'NSMutableArray<NSStrin…
176 [[NSMutableArray<NSString *> alloc] initWithArray: stringArray]; // okay
177 …loc] initWithArray: stringArray]; // expected-warning{{sending 'NSArray<NSString *> *' to paramete…
183 NSNumber *number = kindofStringArray[0]; // expected-warning{{of type '__kindof NSString *'}}
187 NSMutableSet<NSString *> *mutStringSet,
190 MutableSetOfArrays<NSString *> *mutStringArraySet,
196 [mutStringSet addObject: window]; // expected-warning{{parameter of type 'NSString *'}}
199 …[mutStringArraySet addObject: window]; // expected-warning{{parameter of type 'NSArray<NSString *>…
209 NSSet<NSString *> *stringSet,
210 NSMutableSet<NSString *> *mutStringSet,
213 MutableSetOfArrays<NSString *> *mutStringArraySet,
219 ip = stringSet.allObjects; // expected-warning{{from 'NSArray<NSString *> *'}}
220 ip = mutStringSet.allObjects; // expected-warning{{from 'NSArray<NSString *> *'}}
223 ip = mutStringArraySet.allObjects; // expected-warning{{from 'NSArray<NSArray<NSString *> *> *'}}
234 NSMutableSet<NSString *> *mutStringSet,
237 MutableSetOfArrays<NSString *> *mutStringArraySet,
243 mutStringSet.allObjects = ip; // expected-warning{{to 'NSArray<NSString *> *'}}
246 mutStringArraySet.allObjects = ip; // expected-warning{{to 'NSArray<NSArray<NSString *> *> *'}}
257 NSArray<NSString *> *stringArray,
258 NSMutableArray<NSString *> *mutStringArray,
261 NSDictionary<NSString *, Widget *> *stringWidgetDict,
262 NSMutableDictionary<NSString *, Widget *> *mutStringWidgetDict,
266 NSString *string;
270 ip = stringArray[0]; // expected-warning{{from 'NSString *'}}
272 ip = mutStringArray[0]; // expected-warning{{from 'NSString *'}}
273 mutStringArray[0] = ip; // expected-warning{{parameter of type 'NSString *'}}
281 widget = stringWidgetDict[widget]; // expected-warning{{to parameter of type 'NSString *'}}
284 widget = mutStringWidgetDict[widget]; // expected-warning{{to parameter of type 'NSString *'}}
286 mutStringWidgetDict[widget] = widget; // expected-warning{{to parameter of type 'NSString *'}}
300 void test_instance_variable(NSArray<NSString *> *stringArray,
304 ip = stringArray->data; // expected-warning{{from 'NSString **'}}
319 void test_implicit_conversions(NSArray<NSString *> *stringArray,
321 NSMutableArray<NSString *> *mutStringArray,
331 …; // expected-warning{{incompatible pointer types assigning to 'NSArray<NSString *> *' from 'NSArr…
337 …compatible pointer types assigning to 'NSArray<NSNumber *> *' from 'NSMutableArray<NSString *> *'}}
352 void test_variance(NSCovariant1<NSString *> *covariant1,
354 NSCovariant1<NSString *(^)(void)> *covariant3,
358 NSContravariant1<NSString *> *contravariant1,
361 … pointer types assigning to 'NSCovariant1<NSMutableString *> *' from 'NSCovariant1<NSString *> *'}}
364 …igning to 'NSCovariant1<NSMutableString *(^)(void)> *' from 'NSCovariant1<NSString *(^)(void)> *'}}
372 …cted-warning{{incompatible pointer types assigning to 'NSContravariant1<NSString *> *' from 'NSCon…
379 void test_ternary_operator(NSArray<NSString *> *stringArray,
381 NSMutableArray<NSString *> *mutStringArray,
389 ip = cond ? stringArray : mutStringArray; // expected-warning{{from 'NSArray<NSString *> *'}}
390 ip = cond ? mutStringArray : stringArray; // expected-warning{{from 'NSArray<NSString *> *'}}
392 ip = cond ? stringArray2 : mutStringArray; // expected-warning{{from 'NSArray<NSString *> *'}}
393 ip = cond ? mutStringArray : stringArray2; // expected-warning{{from 'NSArray<NSString *> *'}}
403 … numberArray; // expected-warning{{incompatible operand types ('NSArray<NSString *> *' and 'NSArra…
412 ip = super.lastObject; // expected-warning{{from 'NSString *'}}
413 super.lastObject = ip; // expected-warning{{to 'NSString *'}}
414 ip = [super objectAtIndexedSubscript:0]; // expected-warning{{from 'NSString *'}}
419 ip = super.array; // expected-warning{{from 'NSArray<NSString *> *'}}
420 super.array = ip; // expected-warning{{to 'NSArray<NSString *> *'}}
421 ip = [super array]; // expected-warning{{from 'NSArray<NSString *> *'}}