2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Wselector -verify -Wno-objc-root-class %s
|
2011-02-05 07:30:23 +08:00
|
|
|
// rdar://8851684
|
|
|
|
|
|
|
|
@interface Foo
|
|
|
|
- (void) foo;
|
|
|
|
- (void) bar;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Foo
|
|
|
|
- (void) bar
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) foo
|
|
|
|
{
|
|
|
|
SEL a,b,c;
|
2014-01-15 08:59:25 +08:00
|
|
|
a = @selector(b1ar); // expected-warning {{no method with selector 'b1ar' is implemented in this translation unit}}
|
2011-02-05 07:30:23 +08:00
|
|
|
b = @selector(bar);
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I
|
|
|
|
- length;
|
|
|
|
@end
|
|
|
|
|
|
|
|
SEL func()
|
|
|
|
{
|
2014-01-15 08:59:25 +08:00
|
|
|
return @selector(length); // expected-warning {{no method with selector 'length' is implemented in this translation unit}}
|
2011-02-05 07:30:23 +08:00
|
|
|
}
|
2011-07-14 03:05:43 +08:00
|
|
|
|
|
|
|
// rdar://9545564
|
|
|
|
@class MSPauseManager;
|
|
|
|
|
|
|
|
@protocol MSPauseManagerDelegate
|
|
|
|
@optional
|
|
|
|
- (void)pauseManagerDidPause:(MSPauseManager *)manager;
|
|
|
|
- (int)respondsToSelector:(SEL)aSelector;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface MSPauseManager
|
|
|
|
{
|
|
|
|
id<MSPauseManagerDelegate> _delegate;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@implementation MSPauseManager
|
|
|
|
- (id) Meth {
|
|
|
|
if ([_delegate respondsToSelector:@selector(pauseManagerDidPause:)])
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2013-01-22 06:32:29 +08:00
|
|
|
// rdar://12938616
|
|
|
|
@class NSXPCConnection;
|
|
|
|
|
|
|
|
@interface NSObject
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface INTF : NSObject
|
|
|
|
{
|
|
|
|
NSXPCConnection *cnx; // Comes in as a parameter.
|
|
|
|
}
|
|
|
|
- (void) Meth;
|
|
|
|
@end
|
|
|
|
|
|
|
|
extern SEL MySelector(SEL s);
|
|
|
|
|
|
|
|
@implementation INTF
|
|
|
|
- (void) Meth {
|
2014-01-15 08:59:25 +08:00
|
|
|
if( [cnx respondsToSelector:MySelector(@selector( _setQueue: ))] ) // expected-warning {{no method with selector '_setQueue:' is implemented in this translation unit}}
|
2013-01-22 06:32:29 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
if( [cnx respondsToSelector:@selector( _setQueueXX: )] ) // No warning here.
|
|
|
|
{
|
|
|
|
}
|
2013-01-23 02:35:43 +08:00
|
|
|
if( [cnx respondsToSelector:(@selector( _setQueueXX: ))] ) // No warning here.
|
|
|
|
{
|
|
|
|
}
|
2013-01-22 06:32:29 +08:00
|
|
|
}
|
|
|
|
@end
|
2013-05-31 05:48:58 +08:00
|
|
|
|
|
|
|
// rdar://14007194
|
|
|
|
@interface UxTechTest : NSObject
|
2014-01-11 03:27:21 +08:00
|
|
|
- (int) invalidate : (id)Arg;
|
|
|
|
+ (int) C_invalidate : (int)arg;
|
2013-05-31 05:48:58 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface UxTechTest(CAT)
|
2014-01-11 03:27:21 +08:00
|
|
|
- (char) invalidate : (int)arg;
|
|
|
|
+ (int) C_invalidate : (char)arg;
|
2013-05-31 05:48:58 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSPort : NSObject
|
2014-01-11 03:27:21 +08:00
|
|
|
- (double) invalidate : (void*)Arg1;
|
|
|
|
+ (int) C_invalidate : (id*)arg;
|
2013-05-31 05:48:58 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@interface USEText : NSPort
|
2014-01-11 03:27:21 +08:00
|
|
|
- (int) invalidate : (int)arg;
|
2013-05-31 05:48:58 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation USEText
|
|
|
|
- (int) invalidate :(int) arg { return 0; }
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface USETextSub : USEText
|
|
|
|
- (int) invalidate : (id)arg;
|
|
|
|
@end
|