]> granicus.if.org Git - clang/commitdiff
objective-C: add Doug's test for my last patch.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 17 Sep 2012 23:24:36 +0000 (23:24 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 17 Sep 2012 23:24:36 +0000 (23:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164079 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaObjC/warning-missing-selector-name.m

index 095702343faaad5ddb72b881b16683d7e2f820ff..d43031eee0b56c837b6e8ac847f37947ed679955 100644 (file)
 -(void) Name1:(id)Arg1 Name2:(id) Name3:(id)Arg3; // expected-warning {{'Name3' used as the name of the previous parameter rather than as part of the selector}} \
                                   // expected-note {{introduce a parameter name to make 'Name3' part of the selector}} \
                                   // expected-note {{or insert whitespace before ':' to use 'Name3' as parameter name and have an empty entry in the selector}}
+- method:(id) second:(id)second; // expected-warning {{'second' used as the name of the previous parameter rather than as part of the selector}} \
+                                  // expected-note {{introduce a parameter name to make 'second' part of the selector}} \
+                                  // expected-note {{or insert whitespace before ':' to use 'second' as parameter name and have an empty entry in the selector}} \
+                                  // expected-note {{method definition for 'method::' not found}}
+                                 
 @end
 
-@implementation INTF
+@implementation INTF // expected-warning {{incomplete implementation}}
 -(void) Name1:(id)Arg1 Name2:(id)Arg2{}
 -(void) Name1:(id) Name2:(id)Arg2 {} // expected-warning {{'Name2' used as the name of the previous parameter rather than as part of the selector}} \
                                        // expected-note {{introduce a parameter name to make 'Name2' part of the selector}} \
@@ -23,4 +28,5 @@
 -(void) Name1:(id)Arg1 Name2:(id) Name3:(id)Arg3 {} // expected-warning {{'Name3' used as the name of the previous parameter rather than as part of the selector}} \
                                        // expected-note {{introduce a parameter name to make 'Name3' part of the selector}} \
                                        // expected-note {{or insert whitespace before ':' to use 'Name3' as parameter name and have an empty entry in the selector}}
+- method:(id)first second:(id)second {return 0; }
 @end