blob: 00a02be2c3081842b74c84b612058c323ea7d066 [file] [log] [blame]
Sean Callanan50a9a122012-02-04 01:29:37 +00001// RUN: %clang_cc1 -funknown-anytype -fsyntax-only -fdebugger-support -fdebugger-cast-result-to-id -verify %s
2
3extern __unknown_anytype test0;
4extern __unknown_anytype test1();
5
6void test_unknown_anytype_receiver() {
7 (void)(int)[[test0 unknownMethod] otherUnknownMethod];;
8 (void)(id)[[test1() unknownMethod] otherUnknownMethod];
9}
Fariborz Jahanian509fb3e2012-03-09 18:47:16 +000010
11// rdar://10988847
12@class NSString; // expected-note {{forward declaration of class here}}
13
14void rdar10988847() {
15 id s = [NSString stringWithUTF8String:"foo"]; // expected-warning {{receiver 'NSString' is a forward class and corresponding @interface may not exist}}
16}