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 3 4// CHECK: error: no matching function 5// CHECK: :{[[@LINE+1]]:15-[[@LINE+1]]:28}: note: {{.*}}: 1st argument 6void powerful(__strong id &); 7void lifetime_gcattr_mismatch() { 8 static __weak id weak_id; 9 powerful(weak_id); 10} 11 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 15void func(char *uiui); 16 17__attribute__((objc_root_class)) 18@interface Interface 19- (void)something; 20@end 21 22@implementation Interface 23- (void)something{ 24 func(self); 25} 26@end 27