1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
---|---|
2 | |
3 | // <rdar://problem/6463729> |
4 | @class XX; |
5 | |
6 | void func() { |
7 | XX *obj; |
8 | void *vv; |
9 | |
10 | obj = vv; // expected-error{{assigning to 'XX *' from incompatible type 'void *'}} |
11 | } |
12 | |
13 | // <rdar://problem/7952457> |
14 | @interface I |
15 | { |
16 | void* delegate; |
17 | } |
18 | - (I*) Meth; |
19 | - (I*) Meth1; |
20 | @end |
21 | |
22 | @implementation I |
23 | - (I*) Meth { return static_cast<I*>(delegate); } |
24 | - (I*) Meth1 { return reinterpret_cast<I*>(delegate); } |
25 | @end |
26 | |
27 |