[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / SemaObjC / method-def-1.m
blobbc7ea7bc449c9f0f8f5a51a0ae86f7f11193df34
1 // RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify %s
3 @interface foo
4 - (int)meth;
5 @end
7 @implementation foo
8 - (int) meth { return [self meth]; }
9 @end
11 // PR2708
12 @interface MyClass
13 +- (void)myMethod;   // expected-error {{expected selector for Objective-C method}}
14 - (vid)myMethod2;    // expected-error {{expected a type}}
15 @end
17 @implementation MyClass
18 - (void)myMethod { }
19 - (vid)myMethod2 { }    // expected-error {{expected a type}}
21 @end
24 @protocol proto;
25 @protocol NSObject;
27 //@protocol GrowlPluginHandler <NSObject> @end
30 @interface SomeClass2
31 - (int)myMethod1: (id<proto>)
32 arg; // expected-note {{previous definition is here}}
33 @end
35 @implementation SomeClass2
36 - (int)myMethod1: (id<NSObject>)
37   arg { // expected-warning {{conflicting parameter types in implementation of 'myMethod1:': 'id<proto>' vs 'id<NSObject>'}}
38   
40 @end