aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjCXX/references.mm
blob: e02f360f7876043434e43625da14af760a6c1c34 (plain) (blame)
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
26
27
28
29
// FIXME: This crashes, disable it until fixed.
// RN: clang-cc -verify -emit-llvm -o - %s
// RUN: false
// XFAIL: *

// Test reference binding.

typedef struct {
  int f0;
  int f1;
} T;

@interface A
@property (assign) T p0;
@property (assign) T& p1;
@end

int f0(const T& t) {
  return t.f0;
}

int f1(A *a) {
  return f0(a.p0);
}

int f2(A *a) {
  return f0(a.p1);
}