YouCompleteMe/cpp/llvm/tools/clang/test/SemaObjC/debugger-cast-result-to-id.m
Strahinja Val Markovic 1f51a89d39 Adding more llvm/clang files
These were ignored by git accidentally. We want ALL OF THEM since they all came
in the llvm/clang source distribution.
2012-07-05 17:55:45 -07:00

17 lines
606 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];
}
// 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}}
}