xref: /aosp_15_r20/external/clang/test/SemaObjC/error-outof-scope-property-use.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
2*67e74705SXin Li// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s
3*67e74705SXin Li// rdar://13178483
4*67e74705SXin Li
5*67e74705SXin Li@class NSMutableDictionary; // expected-note {{receiver is instance of class declared here}}
6*67e74705SXin Li
7*67e74705SXin Li@interface LaunchdJobs
8*67e74705SXin Li
9*67e74705SXin Li@property (nonatomic,retain) NSMutableDictionary *uuids_jobs; // expected-note {{'_uuids_jobs' declared here}}
10*67e74705SXin Li
11*67e74705SXin Li@end
12*67e74705SXin Li
13*67e74705SXin Li@implementation LaunchdJobs
14*67e74705SXin Li
15*67e74705SXin Li-(void)job
16*67e74705SXin Li{
17*67e74705SXin Li
18*67e74705SXin Li [uuids_jobs objectForKey]; // expected-error {{use of undeclared identifier 'uuids_jobs'}} \
19*67e74705SXin Li                            // expected-warning {{instance method '-objectForKey' not found}}
20*67e74705SXin Li}
21*67e74705SXin Li
22*67e74705SXin Li
23*67e74705SXin Li@end
24*67e74705SXin Li
25*67e74705SXin Livoid
26*67e74705SXin LidoLaunchdJobCPU()
27*67e74705SXin Li{
28*67e74705SXin Li [uuids_jobs enumerateKeysAndObjectsUsingBlock]; // expected-error {{use of undeclared identifier 'uuids_jobs'}}
29*67e74705SXin Li}
30