xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjCXX/property-derived-to-base-conv.mm (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fobjc-gc -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s
2*f4a2713aSLionel Sambuc// rdar: // 7501812
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambucstruct A {
5*f4a2713aSLionel Sambuc  int member;
6*f4a2713aSLionel Sambuc  void foo();
7*f4a2713aSLionel Sambuc  A *operator->();
8*f4a2713aSLionel Sambuc};
9*f4a2713aSLionel Sambucstruct B : A { };
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambuc@interface BInt {
12*f4a2713aSLionel Sambuc@private
13*f4a2713aSLionel Sambuc  B *b;
14*f4a2713aSLionel Sambuc}
15*f4a2713aSLionel Sambuc- (B)value;
16*f4a2713aSLionel Sambuc- (void)setValue : (B) arg;
17*f4a2713aSLionel Sambuc@property B value;
18*f4a2713aSLionel Sambuc@end
19*f4a2713aSLionel Sambuc
20*f4a2713aSLionel Sambucvoid g(BInt *bint) {
21*f4a2713aSLionel Sambuc  bint.value.foo();
22*f4a2713aSLionel Sambuc  bint.value->member = 17;
23*f4a2713aSLionel Sambuc  int x = bint.value.member;
24*f4a2713aSLionel Sambuc}
25*f4a2713aSLionel Sambuc
26