[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / SemaObjC / method-lookup-4.m
blob700565e783293fe712f3eb567dbccc07f54d6037
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @interface NSObject {}
5 @end
7 @interface MyClass : NSObject {}
9 @end
11 @interface MyClass (MyCategorie)
13 @end
15 @interface MySubClass : MyClass {}
17 @end
19 @interface MySubSubClass : MySubClass {}
21 @end
23 @implementation NSObject (NSObjectCategory)
24 - (void)rootMethod {}
25 @end
27 @implementation MyClass
29 + (void)myClassMethod { }
30 - (void)myMethod { }
32 @end
34 @implementation MyClass (MyCategorie)
35 + (void)myClassCategoryMethod { }
36 - (void)categoryMethod {}
37 @end
39 @implementation MySubClass
41 - (void)mySubMethod {}
43 - (void)myTest {
44   [self mySubMethod];
45   // should lookup method in superclass implementation if available
46   [self myMethod];
47   [super myMethod];
48   
49   [self categoryMethod];
50   [super categoryMethod];
51   
52   // instance method of root class
53   [MyClass rootMethod];
54   
55   [MyClass myClassMethod];
56   [MySubClass myClassMethod];
57   
58   [MyClass myClassCategoryMethod];
59   [MySubClass myClassCategoryMethod];
62 @end