1 // RUN: %clang_cc1 -fsyntax-only -Wselector -verify -Wno-objc-root-class %s
27 return @selector(length); // expected-warning {{no method with selector 'length' is implemented in this translation unit}}
30 @class MSPauseManager;
32 @protocol MSPauseManagerDelegate
34 - (void)pauseManagerDidPause:(MSPauseManager *)manager;
35 - (int)respondsToSelector:(SEL)aSelector;
38 @interface MSPauseManager
40 id<MSPauseManagerDelegate> _delegate;
45 @implementation MSPauseManager
47 if ([_delegate respondsToSelector:@selector(pauseManagerDidPause:)])
53 @class NSXPCConnection;
58 @interface INTF : NSObject
60 NSXPCConnection *cnx; // Comes in as a parameter.
65 extern SEL MySelector(SEL s);
69 if( [cnx respondsToSelector:MySelector(@selector( _setQueue: ))] )
73 if( [cnx respondsToSelector:@selector( _setQueueXX: )] ) // No warning here.
76 if( [cnx respondsToSelector:(@selector( _setQueueXX: ))] ) // No warning here.
82 @interface UxTechTest : NSObject
83 - (int) invalidate : (id)Arg;
84 + (int) C_invalidate : (int)arg;
87 @interface UxTechTest(CAT)
88 - (char) invalidate : (int)arg;
89 + (int) C_invalidate : (char)arg;
92 @interface NSPort : NSObject
93 - (double) invalidate : (void*)Arg1;
94 + (int) C_invalidate : (id*)arg;
98 @interface USEText : NSPort
99 - (int) invalidate : (int)arg;
102 @implementation USEText
103 - (int) invalidate :(int) arg { return 0; }
106 @interface USETextSub : USEText
107 - (int) invalidate : (id)arg;
111 - (int) compare: (I16428638 *) arg1; // commenting out this line avoids the warning
115 - (int) compare: (J16428638 *) arg1;
118 @implementation J16428638
120 SEL s = @selector(compare:); // spurious warning
123 - (int) compare: (J16428638 *) arg1 {
128 void test16428638(void) {
129 SEL s = @selector(compare:);
134 @interface SELCanary : NSObject
135 @property (readonly, nonatomic) NSString *name;
136 @property (nonatomic, getter = isHidden) char hidden;
137 @property (nonatomic, copy, getter = hasFish, setter = setFish:) NSString *ridiculousFish;
140 @implementation SELCanary
145 @selector(setHidden:),