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