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