diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-02-04 23:30:23 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-02-04 23:30:23 +0000 |
commit | 1e99a7726ac0d4870f27d1e8425b6ca8833933e4 (patch) | |
tree | 4af25da1a781d9c5465b2f6d52b9e43840640909 | |
parent | 8b789139167d721e3ef1e3d433eabeb351c36fad (diff) |
Restore a test which I accientally overwrote in my last
patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124911 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/SemaObjC/selector-1.m | 39 | ||||
-rw-r--r-- | test/SemaObjC/selector-3.m | 29 |
2 files changed, 48 insertions, 20 deletions
diff --git a/test/SemaObjC/selector-1.m b/test/SemaObjC/selector-1.m index 69a74f830c..16d44cbb55 100644 --- a/test/SemaObjC/selector-1.m +++ b/test/SemaObjC/selector-1.m @@ -1,29 +1,28 @@ -// RUN: %clang_cc1 -fsyntax-only -Wselector -verify %s -// rdar://8851684 +// RUN: %clang_cc1 -verify %s -@interface Foo -- (void) foo; -- (void) bar; +@interface I +- (id) compare: (char) arg1; +- length; @end -@implementation Foo -- (void) bar -{ -} +@interface J +- (id) compare: (id) arg1; +@end -- (void) foo +SEL func() { - SEL a,b,c; - a = @selector(b1ar); // expected-warning {{unimplemented selector 'b1ar'}} - b = @selector(bar); + return @selector(compare:); // Non warning on multiple selector found. } -@end -@interface I -- length; -@end +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 func() -{ - return @selector(length); // expected-warning {{unimplemented selector 'length'}} + SEL s9 = @selector(:enum:bool:); } diff --git a/test/SemaObjC/selector-3.m b/test/SemaObjC/selector-3.m new file mode 100644 index 0000000000..69a74f830c --- /dev/null +++ b/test/SemaObjC/selector-3.m @@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -fsyntax-only -Wselector -verify %s +// rdar://8851684 + +@interface Foo +- (void) foo; +- (void) bar; +@end + +@implementation Foo +- (void) bar +{ +} + +- (void) foo +{ + SEL a,b,c; + a = @selector(b1ar); // expected-warning {{unimplemented selector 'b1ar'}} + b = @selector(bar); +} +@end + +@interface I +- length; +@end + +SEL func() +{ + return @selector(length); // expected-warning {{unimplemented selector 'length'}} +} |