Home | History | Annotate | Download | only in SemaObjCXX
      1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -fsyntax-only -verify %s
      2 
      3 @interface A
      4 @end
      5 
      6 void f0(__strong A**); // expected-note{{candidate function not viable: 1st argument ('A *__weak *') has __weak ownership, but parameter has __strong ownership}}
      7 
      8 void test_f0() {
      9   A *a;
     10   static __weak A *a2;
     11   f0(&a);
     12   f0(&a2); // expected-error{{no matching function}}
     13 }
     14 
     15 void f1(__weak A**); // expected-note{{candidate function not viable: 1st argument ('A *__strong *') has __strong ownership, but parameter has __weak ownership}}
     16 
     17 void test_f1() {
     18   A *a;
     19   __strong A *a2;
     20   f1(&a);
     21   f1(&a2); // expected-error{{no matching function}}
     22 }
     23