SourceRange(LParenLoc, RParenLoc));
if (!Method)
Diag(SelLoc, diag::warn_undeclared_selector) << Sel;
-
- llvm::DenseMap<Selector, SourceLocation>::iterator Pos
- = ReferencedSelectors.find(Sel);
- if (Pos == ReferencedSelectors.end())
- ReferencedSelectors.insert(std::make_pair(Sel, SelLoc));
+
+ if (!Method ||
+ Method->getImplementationControl() != ObjCMethodDecl::Optional) {
+ llvm::DenseMap<Selector, SourceLocation>::iterator Pos
+ = ReferencedSelectors.find(Sel);
+ if (Pos == ReferencedSelectors.end())
+ ReferencedSelectors.insert(std::make_pair(Sel, SelLoc));
+ }
// In ARC, forbid the user from using @selector for
// retain/release/autorelease/dealloc/retainCount.
{
return @selector(length); // expected-warning {{unimplemented selector 'length'}}
}
+
+// 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
+