Douglas Gregor | 377e1bd | 2011-05-08 06:09:53 +0000 | [diff] [blame] | 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{{passing argument to parameter here}} |
| 7 | |
| 8 | void test_f0() { |
| 9 | A *a; |
| 10 | static __weak A *a2; |
| 11 | f0(&a); |
| 12 | f0(&a2); // expected-warning{{passing 'A *__weak *' to parameter of type 'A *__strong *' discards qualifiers}} |
| 13 | } |
| 14 | |
| 15 | void f1(__weak A**); // expected-note{{passing argument to parameter here}} |
| 16 | |
| 17 | void test_f1() { |
| 18 | A *a; |
| 19 | __strong A *a2; |
| 20 | f1(&a); |
| 21 | f1(&a2); // expected-warning{{passing 'A *__strong *' to parameter of type 'A *__weak *' discards qualifiers}} |
| 22 | } |