brintos

brintos / llvm-project-archived public Read only

0
0
Text · 785 B · 1b81caf Raw
27 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -fsyntax-only -verify %s2 3@interface A4@end5 6void f0(__strong A**); // expected-note{{passing argument to parameter here}}7 8void test_f0(void) {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 15void f1(__weak A**); // expected-note{{passing argument to parameter here}}16 17void test_f1(void) {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}23 24// These qualifiers should silently expand to nothing in GC mode.25void test_unsafe_unretained(__unsafe_unretained id *x) {}26void test_autoreleasing(__autoreleasing id *x) {}27