2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2009-02-08 01:16:20 +08:00
|
|
|
|
|
|
|
// <rdar://problem/6463729>
|
|
|
|
@class XX;
|
|
|
|
|
|
|
|
void func() {
|
|
|
|
XX *obj;
|
|
|
|
void *vv;
|
|
|
|
|
2010-04-09 08:35:39 +08:00
|
|
|
obj = vv; // expected-error{{assigning to 'XX *' from incompatible type 'void *'}}
|
2009-02-08 01:16:20 +08:00
|
|
|
}
|
2010-05-11 07:46:53 +08:00
|
|
|
|
|
|
|
// <rdar://problem/7952457>
|
|
|
|
@interface I
|
|
|
|
{
|
|
|
|
void* delegate;
|
|
|
|
}
|
|
|
|
- (I*) Meth;
|
|
|
|
- (I*) Meth1;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I
|
|
|
|
- (I*) Meth { return static_cast<I*>(delegate); }
|
|
|
|
- (I*) Meth1 { return reinterpret_cast<I*>(delegate); }
|
|
|
|
@end
|
|
|
|
|