[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjC / category-method-lookup-2.m
blobed347c7cde0cb87d83846973e92cf9e6c2441ff0
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 typedef struct objc_class *Class;
5 @interface NSObject
6 - (Class)class;
7 @end
8 @interface Bar : NSObject
9 @end
10 @interface Bar (Cat)
11 @end
13 // NOTE: No class implementation for Bar precedes this category definition.
14 @implementation Bar (Cat)
16 // private method.
17 + classMethod { return self; }
19 - instanceMethod {
20   [[self class] classMethod];
21   return 0;
24 @end