1// RUN: %clang_cc1 -fsyntax-only -verify %s
2// RUN: %clang_cc1 -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
3// rdar://16263395
4
5@interface NSObject @end
6
7@interface I : NSObject // expected-note 3 {{receiver is instance of class declared here}}
8+ (id) ClassMeth;
9- (I*) MethInstPI;
10@end
11
12I* pi;
13
14I* foobar();
15
16@implementation I
17- (id) PrivInstMeth {
18  [ foobar() ClassMeth]; // expected-warning {{instance method '-ClassMeth' not found (return type defaults to 'id')}} \
19			 // expected-note {{receiver expression is here}}
20// CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:5-[[@LINE-2]]:13}:"I
21  [[self MethInstPI] ClassMeth]; // expected-warning {{instance method '-ClassMeth' not found (return type defaults to 'id')}} \
22				 // expected-note {{receiver expression is here}}
23// CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:4-[[@LINE-2]]:21}:"I
24  return [pi ClassMeth]; // expected-warning {{instance method '-ClassMeth' not found (return type defaults to 'id')}} \
25                         // expected-note {{receiver expression is here}}
26// CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:11-[[@LINE-2]]:13}:"I
27}
28+ (id) ClassMeth { return 0; }
29- (I*) MethInstPI { return 0; }
30@end
31