diff options
Diffstat (limited to 'clang/test/SemaObjC/selector-1.m')
-rw-r--r-- | clang/test/SemaObjC/selector-1.m | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/clang/test/SemaObjC/selector-1.m b/clang/test/SemaObjC/selector-1.m index 9a7375b8d28..69a74f830ce 100644 --- a/clang/test/SemaObjC/selector-1.m +++ b/clang/test/SemaObjC/selector-1.m @@ -1,35 +1,29 @@ -// RUN: %clang_cc1 -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wselector -verify %s +// rdar://8851684 -@interface Lancelot @end -@implementation Lancelot +@interface Foo +- (void) foo; +- (void) bar; +@end -- (void):(int)x {} -- (void)xx:(int)x :(int)y { } +@implementation Foo +- (void) bar +{ +} +- (void) foo +{ + SEL a,b,c; + a = @selector(b1ar); // expected-warning {{unimplemented selector 'b1ar'}} + b = @selector(bar); +} @end @interface I -- (id) compare: (char) arg1; +- length; @end -@interface J -- (id) compare: (id) arg1; -@end - -SEL foo() +SEL func() { - return @selector(compare:); // Non warning on multiple selector found. -} - -int main() { - SEL s = @selector(retain); - SEL s1 = @selector(meth1:); - SEL s2 = @selector(retainArgument::); - SEL s3 = @selector(retainArgument:::::); - SEL s4 = @selector(retainArgument:with:); - SEL s5 = @selector(meth1:with:with:); - SEL s6 = @selector(getEnum:enum:bool:); - SEL s7 = @selector(char:float:double:unsigned:short:long:); - - SEL s9 = @selector(:enum:bool:); + return @selector(length); // expected-warning {{unimplemented selector 'length'}} } |