summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjC/debugger-cast-result-to-id.m
blob: 00a02be2c3081842b74c84b612058c323ea7d066 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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}}
}