1 // RUN: not %clang_cc1 -fobjc-runtime-has-weak -fobjc-arc -fsyntax-only -fdiagnostics-print-source-range-info %s 2>&1 | FileCheck %s --strict-whitespace -check-prefixes=CHECK,ARC
2 // RUN: not %clang_cc1 -fobjc-runtime-has-weak -fobjc-gc -fsyntax-only -fdiagnostics-print-source-range-info %s 2>&1 | FileCheck %s --strict-whitespace -check-prefixes=CHECK,GC
4 // CHECK: error: no matching function
5 // CHECK: :{[[@LINE+1]]:15-[[@LINE+1]]:28}: note: {{.*}}: 1st argument
6 void powerful(__strong id &);
7 void lifetime_gcattr_mismatch() {
8 static __weak id weak_id;
12 // CHECK: error: no matching function
13 // ARC: :{[[@LINE+2]]:11-[[@LINE+2]]:21}: note: {{.*}}: cannot implicitly convert
14 // GC: :{[[@LINE+1]]:11-[[@LINE+1]]:21}: note: {{.*}}: no known conversion
15 void func(char *uiui);
17 __attribute__((objc_root_class))
22 @implementation Interface