blob: 17bbf01af133c8ab9809dc9a13e8bb962141e903 [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
Fariborz Jahanian12932a02012-02-22 21:13:49 +00002// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
Fariborz Jahanian84ed6002010-01-07 18:18:32 +00003// radar 7490331
4
Fariborz Jahanian12932a02012-02-22 21:13:49 +00005void *sel_registerName(const char *);
6
Fariborz Jahanian84ed6002010-01-07 18:18:32 +00007@interface Foo {
8 int a;
9 id b;
10}
11- (void)bar;
12- (void)baz:(id)q;
13@end
14
15@implementation Foo
Fariborz Jahanianc374cd92010-01-11 17:50:35 +000016// radar 7522803
17static void foo(id bar) {
18 int i = ((Foo *)bar)->a;
19}
20
Fariborz Jahanian84ed6002010-01-07 18:18:32 +000021- (void)bar {
22 a = 42;
23 [self baz:b];
24}
25- (void)baz:(id)q {
26}
27@end
28