xref: /aosp_15_r20/external/clang/test/SemaObjC/objc-buffered-methods.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2*67e74705SXin Li// expected-no-diagnostics
3*67e74705SXin Li// rdar://8843851
4*67e74705SXin Li
5*67e74705SXin Liint* global;
6*67e74705SXin Li
7*67e74705SXin Li@interface I
8*67e74705SXin Li- (void) Meth;
9*67e74705SXin Li@property int prop;
10*67e74705SXin Li@property int prop1;
11*67e74705SXin Li@end
12*67e74705SXin Li
13*67e74705SXin Li@implementation I
14*67e74705SXin Li+ (void) _defaultMinSize { };
15*67e74705SXin Listatic void _initCommon() {
16*67e74705SXin Li  Class graphicClass;
17*67e74705SXin Li  [graphicClass _defaultMinSize];
18*67e74705SXin Li}
19*67e74705SXin Li
20*67e74705SXin Li- (void) Meth { [self Forw]; } // No warning now
21*67e74705SXin Li- (void) Forw {}
22*67e74705SXin Li- (int) func { return prop; }  // compiles - synthesized ivar will be accessible here.
23*67e74705SXin Li- (int)get_g { return global; } // No warning here - synthesized ivar will be accessible here.
24*67e74705SXin Li@synthesize prop;
25*67e74705SXin Li@synthesize prop1=global;
26*67e74705SXin Li@end
27