debugger-cast-result-to-id.mm revision 509fb3e2cdf31a0be375eb74bedfddeb648f7d36
1// RUN: %clang_cc1 -fdebugger-support -fdebugger-cast-result-to-id -funknown-anytype -fsyntax-only -verify %s 2 3// rdar://problem/9416370 4namespace test0 { 5 void test(id x) { 6 if ([x foo]) {} // expected-error {{no known method '-foo'; cast the message send to the method's return type}} 7 [x foo]; 8 } 9} 10 11// rdar://10988847 12@class NSString; // expected-note {{forward declaration of class here}} 13namespace test1 { 14 void rdar10988847() { 15 id s = [NSString stringWithUTF8String:"foo"]; // expected-warning {{receiver 'NSString' is a forward class and corresponding @interface may not exist}} 16 } 17} 18