Fariborz Jahanian | 12932a0 | 2012-02-22 21:13:49 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw-modern.cpp |
2 | // RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw-modern.cpp | ||||
3 | |||||
4 | void *sel_registerName(const char *); | ||||
5 | |||||
6 | @interface Foo { | ||||
7 | int a; | ||||
8 | id b; | ||||
9 | } | ||||
10 | - (void)bar; | ||||
11 | - (void)baz:(id)q; | ||||
12 | @end | ||||
13 | |||||
14 | @implementation Foo | ||||
15 | // radar 7522803 | ||||
16 | static void foo(id bar) { | ||||
17 | int i = ((Foo *)bar)->a; | ||||
18 | } | ||||
19 | |||||
20 | - (void)bar { | ||||
21 | a = 42; | ||||
22 | } | ||||
23 | - (void)baz:(id)q { | ||||
24 | } | ||||
25 | @end | ||||
26 |