1// 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
2// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3// radar 7490331
4
5void *sel_registerName(const char *);
6
7@interface Foo {
8        int a;
9        id b;
10}
11- (void)bar;
12- (void)baz:(id)q;
13@end
14
15@implementation Foo
16// radar 7522803
17static void foo(id bar) {
18        int i = ((Foo *)bar)->a;
19}
20
21- (void)bar {
22        a = 42;
23        [self baz:b];
24}
25- (void)baz:(id)q {
26}
27@end
28
29