minix/external/bsd/llvm/dist/clang/test/SemaObjC/debugger-cast-result-to-id.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

18 lines
640 B
Objective-C

// RUN: %clang_cc1 -funknown-anytype -fsyntax-only -fdebugger-support -fdebugger-cast-result-to-id -verify %s
extern __unknown_anytype test0;
extern __unknown_anytype test1();
void test_unknown_anytype_receiver() {
(void)(int)[[test0 unknownMethod] otherUnknownMethod];;
(void)(id)[[test1() unknownMethod] otherUnknownMethod];
id x = test0;
id y = test1();
}
// rdar://10988847
@class NSString; // expected-note {{forward declaration of class here}}
void rdar10988847() {
id s = [NSString stringWithUTF8String:"foo"]; // expected-warning {{receiver 'NSString' is a forward class and corresponding @interface may not exist}}
}