]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/SemaObjC/error-outof-scope-property-use.m
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
[FreeBSD/FreeBSD.git] / test / SemaObjC / error-outof-scope-property-use.m
1 // RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
2 // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s
3 // rdar://13178483
4
5 @class NSMutableDictionary; // expected-note {{receiver is instance of class declared here}}
6
7 @interface LaunchdJobs 
8
9 @property (nonatomic,retain) NSMutableDictionary *uuids_jobs; // expected-note {{'_uuids_jobs' declared here}}
10
11 @end
12
13 @implementation LaunchdJobs
14
15 -(void)job
16 {
17
18  [uuids_jobs objectForKey]; // expected-error {{use of undeclared identifier 'uuids_jobs'}} \
19                             // expected-warning {{instance method '-objectForKey' not found}}
20 }
21
22
23 @end
24
25 void
26 doLaunchdJobCPU()
27 {
28  [uuids_jobs enumerateKeysAndObjectsUsingBlock]; // expected-error {{use of undeclared identifier 'uuids_jobs'}}
29 }