brintos

brintos / llvm-project-archived public Read only

0
0
Text · 978 B · 6b9b849 Raw
27 lines · plain
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,ARC2// 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,GC3 4// CHECK:      error: no matching function5// CHECK:      :{[[@LINE+1]]:15-[[@LINE+1]]:28}: note: {{.*}}: 1st argument6void powerful(__strong id &);7void lifetime_gcattr_mismatch() {8  static __weak id weak_id;9  powerful(weak_id);10}11 12// CHECK:      error: no matching function13// ARC:        :{[[@LINE+2]]:11-[[@LINE+2]]:21}: note: {{.*}}: cannot implicitly convert14// GC:         :{[[@LINE+1]]:11-[[@LINE+1]]:21}: note: {{.*}}: no known conversion15void func(char *uiui);16 17__attribute__((objc_root_class))18@interface Interface19- (void)something;20@end21 22@implementation Interface23- (void)something{24    func(self);25}26@end27