blob: 70a93b2e33d10d3fa73bbecd7a21188ac0984f2f [file] [log] [blame]
Douglas Gregorf30053d2011-05-08 06:09:53 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -fsyntax-only -verify %s
2
3@interface A
4@end
5
6void f0(__strong A**); // expected-note{{candidate function not viable: 1st argument ('A *__weak *') has __weak lifetime, but parameter has __strong lifetime}}
7
8void test_f0() {
9 A *a;
10 static __weak A *a2;
11 f0(&a);
12 f0(&a2); // expected-error{{no matching function}}
13}
14
15void f1(__weak A**); // expected-note{{candidate function not viable: 1st argument ('A *__strong *') has __strong lifetime, but parameter has __weak lifetime}}
16
17void test_f1() {
18 A *a;
19 __strong A *a2;
20 f1(&a);
21 f1(&a2); // expected-error{{no matching function}}
22}