blob: afc6b96812f0ceb0c037df4d72cf0eae001ccb4c [file] [log] [blame]
Douglas Gregor028ea4b2011-04-26 23:16:46 +00001// RUN: %clang_cc1 -fsyntax-only -fobjc-gc -fobjc-nonfragile-abi -verify %s
2
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