return TC_Success;
}
}
- else if (CStyle && DestType->isObjCObjectPointerType()) {
- // allow c-style cast of objective-c pointers as they are pervasive.
+ else if (DestType->isObjCObjectPointerType()) {
+ // allow both c-style cast and static_cast of objective-c pointers as
+ // they are pervasive.
Kind = CastExpr::CK_AnyPointerToObjCPointerCast;
return TC_Success;
}
obj = vv; // expected-error{{assigning to 'XX *' from incompatible type 'void *'}}
}
+
+// <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
+