]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/SemaObjC/ivar-sem-check-2.m
Vendor import of clang trunk r130700:
[FreeBSD/FreeBSD.git] / test / SemaObjC / ivar-sem-check-2.m
1 // RUN: %clang_cc1  -fsyntax-only -fobjc-nonfragile-abi -verify %s
2
3 @interface Super  {
4   id value2; // expected-note {{previously declared 'value2' here}}
5
6 @property(retain) id value;
7 @property(retain) id value1;
8 @property(retain) id prop;
9 @end
10
11 @interface Sub : Super 
12 {
13   id value; 
14 }
15 @end
16
17 @implementation Sub
18 @synthesize value; // expected-note {{previous use is here}}
19 @synthesize value1=value; // expected-error {{synthesized properties 'value1' and 'value' both claim ivar 'value'}} 
20 @synthesize prop=value2;  // expected-error {{property 'prop' attempting to use ivar 'value2' declared in super class 'Super'}}
21 @end
22
23