summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjCXX/references.mm
blob: c2232e2e02f85c47d3c1d1f71be8ca7b0a497559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s

struct A { ~A(); };

@interface B {
  A a;
}

- (const A&)getA;
@end

@implementation B 

- (const A&)getA {
  return a;
}

@end

// CHECK: define void @_Z1fP1B
// CHECK: objc_msgSend to
// CHECK: ret void
void f(B* b) {
  (void)[b getA];
}
OpenPOWER on IntegriCloud