blob: 97151fd7fa49f436d11e21aa1fe769e67654133d [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
Douglas Gregor50f4e702009-02-07 17:16:20 +00002
3// <rdar://problem/6463729>
4@class XX;
5
6void func() {
7 XX *obj;
8 void *vv;
9
Douglas Gregord4eea832010-04-09 00:35:39 +000010 obj = vv; // expected-error{{assigning to 'XX *' from incompatible type 'void *'}}
Douglas Gregor50f4e702009-02-07 17:16:20 +000011}
Fariborz Jahanian2f6c5502010-05-10 23:46:53 +000012
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