1 // RUN: %clang_cc1 -fsyntax-only -verify -Wsign-conversion %s
3 typedef unsigned int NSUInteger;
10 @interface X : NSObject
11 @property NSUInteger uint;
14 @interface NSArray : NSObject
17 - (id)objectAtIndex:(NSUInteger)index;
18 - (id)objectAtIndexedSubscript:(NSUInteger)index;
25 [x setUint:sint]; // expected-warning {{implicit conversion changes signedness: 'int' to 'NSUInteger'}}
26 x.uint = sint; // expected-warning {{implicit conversion changes signedness: 'int' to 'NSUInteger'}}
33 (void)((NSObject*)array[si]).hash; // expected-warning {{implicit conversion changes signedness: 'int' to 'NSUInteger'}}
35 (void)[((NSObject*)array[si]) hash]; // expected-warning {{implicit conversion changes signedness: 'int' to 'NSUInteger'}}
36 (void)array[si]; // expected-warning {{implicit conversion changes signedness: 'int' to 'NSUInteger'}}