xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjCXX/overload-gc.mm (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -triple i386-apple-darwin9 -fobjc-gc -verify %s
2*f4a2713aSLionel Sambuc// expected-no-diagnostics
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambucvoid f0(__weak id *);
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambucvoid test_f0(id *x) {
7*f4a2713aSLionel Sambuc  f0(x);
8*f4a2713aSLionel Sambuc}
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc@interface A
11*f4a2713aSLionel Sambuc@end
12*f4a2713aSLionel Sambuc
13*f4a2713aSLionel Sambucvoid f1(__weak id*);
14*f4a2713aSLionel Sambucvoid test_f1(__weak A** a) {
15*f4a2713aSLionel Sambuc  f1(a);
16*f4a2713aSLionel Sambuc}
17*f4a2713aSLionel Sambuc
18*f4a2713aSLionel Sambuc@interface B : A
19*f4a2713aSLionel Sambuc@end
20*f4a2713aSLionel Sambuc
21*f4a2713aSLionel Sambucvoid f2(__weak A**);
22*f4a2713aSLionel Sambucvoid test_f2(__weak B** b) {
23*f4a2713aSLionel Sambuc  f2(b);
24*f4a2713aSLionel Sambuc}
25*f4a2713aSLionel Sambuc
26