1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -funknown-anytype -fsyntax-only -fdebugger-support -fdebugger-cast-result-to-id -verify %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambucextern __unknown_anytype test0; 4*f4a2713aSLionel Sambucextern __unknown_anytype test1(); 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambucvoid test_unknown_anytype_receiver() { 7*f4a2713aSLionel Sambuc (void)(int)[[test0 unknownMethod] otherUnknownMethod];; 8*f4a2713aSLionel Sambuc (void)(id)[[test1() unknownMethod] otherUnknownMethod]; 9*f4a2713aSLionel Sambuc id x = test0; 10*f4a2713aSLionel Sambuc id y = test1(); 11*f4a2713aSLionel Sambuc} 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc// rdar://10988847 14*f4a2713aSLionel Sambuc@class NSString; // expected-note {{forward declaration of class here}} 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambucvoid rdar10988847() { 17*f4a2713aSLionel Sambuc id s = [NSString stringWithUTF8String:"foo"]; // expected-warning {{receiver 'NSString' is a forward class and corresponding @interface may not exist}} 18*f4a2713aSLionel Sambuc} 19