1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
10 -(void) my_method:(foo) my_param; // expected-error {{interface type 'foo' cannot be passed by value; did you forget * in 'foo'}}
11 - (foo)cccccc:(long)ddddd; // expected-error {{interface type 'foo' cannot be returned by value; did you forget * in 'foo'}}
15 -(void) my_method:(foo) my_param // expected-error {{interface type 'foo' cannot be passed by value; did you forget * in 'foo'}}
18 - (foo)cccccc:(long)ddddd // expected-error {{interface type 'foo' cannot be returned by value; did you forget * in 'foo'}}
23 // Ensure that this function is properly marked as a failure.
24 void func_with_bad_call(bar* b, foo* f) {
25 [b cccccc:5]; // expected-warning {{instance method '-cccccc:' not found}}
26 // expected-note@-17 {{receiver is instance of class declared here}}
29 void somefunc(foo x) {} // expected-error {{interface type 'foo' cannot be passed by value; did you forget * in 'foo'}}
30 foo somefunc2(void) {} // expected-error {{interface type 'foo' cannot be returned by value; did you forget * in 'foo'}}
33 extern void g0(int x, ...);
34 g0(1, *(foo*)a0); // expected-error {{cannot pass object with interface type 'foo' by value through variadic function}}
37 enum bogus; // expected-note {{forward declaration of 'enum bogus'}}
41 - (void)crashMe:(enum bogus)p;
45 - (void)crashMe:(enum bogus)p { // expected-error {{variable has incomplete type 'enum bogus'}}
50 - (int[6])arrayRet; // expected-error {{function cannot return array type 'int[6]'}}
51 - (int(void))funcRet; // expected-error {{function cannot return function type 'int (void)'}}
55 - (void) my_method: (int)arg; // expected-note {{method 'my_method:' declared here}}
58 // FIXME: The diagnostic and recovery here could probably be improved.
59 @implementation qux // expected-warning {{method definition for 'my_method:' not found}}
60 - (void) my_method: (int) { // expected-error {{expected identifier}}