Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Misc / diag-overload-cand-ranges.mm
blob6b9b849b0997d106883f77799234aa4715d3c4da
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;
9   powerful(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))
18 @interface Interface
19 - (void)something;
20 @end
22 @implementation Interface
23 - (void)something{
24     func(self);
26 @end