mode as they are pervasive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90867
91177308-0d34-0410-b5e6-
96231b3b80d8
if (CastTy->isDependentType() || CastExpr->isTypeDependent())
return false;
+ // allow c-style cast of objective-c pointers as they are pervasive.
+ if (CastTy->isObjCObjectPointerType())
+ return false;
+
if (!CastTy->isLValueReferenceType() && !CastTy->isRecordType())
DefaultFunctionArrayConversion(CastExpr);
--- /dev/null
+// RUN: clang-cc -fsyntax-only -verify %s
+
+@protocol P @end
+@interface I @end
+
+int main() {
+ void *cft;
+ id oct = (id)cft;
+
+ Class ccct;
+ ccct = (Class)cft;
+
+ I* iict = (I*)cft;
+
+ id<P> pid = (id<P>)cft;
+
+ I<P> *ip = (I<P>*)cft;
+
+}
+