diff options
Diffstat (limited to 'test/SemaObjC/method-bad-param.m')
-rw-r--r-- | test/SemaObjC/method-bad-param.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaObjC/method-bad-param.m b/test/SemaObjC/method-bad-param.m index d44b536..ad67a34 100644 --- a/test/SemaObjC/method-bad-param.m +++ b/test/SemaObjC/method-bad-param.m @@ -42,3 +42,17 @@ enum bogus; // expected-note {{forward declaration of 'enum bogus'}} } @end +@interface arrayfun +- (int[6])arrayRet; // expected-error {{function cannot return array type 'int [6]'}} +- (int())funcRet; // expected-error {{function cannot return function type 'int ()'}} +@end + +@interface qux +- (void) my_method: (int)arg; // expected-note {{method 'my_method:' declared here}} +@end + +// FIXME: The diagnostic and recovery here could probably be improved. +@implementation qux // expected-warning {{method definition for 'my_method:' not found}} +- (void) my_method: (int) { // expected-error {{expected identifier}} +} +@end |