aboutsummaryrefslogtreecommitdiff
path: root/test/FixIt/selector-fixit.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/FixIt/selector-fixit.m')
-rw-r--r--test/FixIt/selector-fixit.m41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/FixIt/selector-fixit.m b/test/FixIt/selector-fixit.m
new file mode 100644
index 000000000000..e9d2f19df1a1
--- /dev/null
+++ b/test/FixIt/selector-fixit.m
@@ -0,0 +1,41 @@
+// RUN: cp %s %t
+// RUN: %clang_cc1 -x objective-c -Wundeclared-selector -fixit %t
+// RUN: %clang_cc1 -x objective-c -Wundeclared-selector -Werror %t
+// rdar://14039037
+
+@interface NSObject @end
+
+@interface LogoutController : NSObject
+- (void)close;
+- (void)closed;
+- (void) open : (id) file_id;
+@end
+
+@implementation LogoutController
+
+- (void)close { }
+- (void)closed { }
+
+- (SEL)Meth
+{
+ return @selector(cloze);
+}
+- (void) open : (id) file_id {}
+
+- (SEL)Meth1
+{
+ return @selector(ope:);
+}
+
+@end
+
+// rdar://7853549
+@interface rdar7853549 : NSObject
+- (int) bounds;
+@end
+
+@implementation rdar7853549
+- (int) bounds { return 0; }
+- (void)PrivateMeth { int bounds = [self bonds]; }
+- (void)OtherPrivateMeth : (id) p { int bounds = [p bonds]; }
+@end