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