blob: d2ddd40efb4cc3d68b6737bc357270b482c1b2d1 [file] [log] [blame]
Douglas Gregor17ffd142011-04-27 03:24:57 +00001// RUN: %clang_cc1 -fsyntax-only -triple i386-apple-darwin9 -fobjc-gc -verify %s
Douglas Gregor028ea4b2011-04-26 23:16:46 +00002
3void f0(__weak id *); // expected-note{{candidate function not viable: 1st argument ('id *') has no lifetime, but parameter has __weak lifetime}}
4
5void test_f0(id *x) {
6 f0(x); // expected-error{{no matching function for call to 'f0'}}
7}
8
9@interface A
10@end
11
12void f1(__weak id*);
13void test_f1(__weak A** a) {
14 f1(a);
15}
16
17@interface B : A
18@end
19
20void f2(__weak A**);
21void test_f2(__weak B** b) {
22 f2(b);
23}
24