1 // RUN: %clang_cc1 -fsyntax-only -Wselector -verify %s 2 // rdar://8851684 3 4 @interface Foo 5 - (void) foo; 6 - (void) bar; 7 @end 8 9 @implementation Foo 10 - (void) bar 11 { 12 } 13 14 - (void) foo 15 { 16 SEL a,b,c; 17 a = @selector(b1ar); // expected-warning {{unimplemented selector 'b1ar'}} 18 b = @selector(bar); 19 } 20 @end 21 22 @interface I 23 - length; 24 @end 25 26 SEL func() 27 { 28 return @selector(length); // expected-warning {{unimplemented selector 'length'}} 29 } 30 31 // rdar://9545564 32 @class MSPauseManager; 33 34 @protocol MSPauseManagerDelegate 35 @optional 36 - (void)pauseManagerDidPause:(MSPauseManager *)manager; 37 - (int)respondsToSelector:(SEL)aSelector; 38 @end 39 40 @interface MSPauseManager 41 { 42 id<MSPauseManagerDelegate> _delegate; 43 } 44 @end 45 46 47 @implementation MSPauseManager 48 - (id) Meth { 49 if ([_delegate respondsToSelector:@selector(pauseManagerDidPause:)]) 50 return 0; 51 return 0; 52 } 53 @end 54 55