Allow pointer convesion of an objective-c pointer to
'void *' to mimic gcc's behavior. (fixes radar 7477351).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91570 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjCXX/objc-pointer-conv.mm b/test/SemaObjCXX/objc-pointer-conv.mm
new file mode 100644
index 0000000..c03e3aa
--- /dev/null
+++ b/test/SemaObjCXX/objc-pointer-conv.mm
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+typedef const void * VoidStar;
+
+typedef struct __CFDictionary * CFMDRef;
+
+void RandomFunc(CFMDRef theDict, const void *key, const void *value);
+
+@interface Foo
+- (void)_apply:(void (*)(const void *, const void *, void *))func context:(void *)context;
+- (void)a:(id *)objects b:(id *)keys;
+@end
+
+@implementation Foo
+- (void)_apply:(void (*)(const void *, const void *, void *))func context:(void *)context {
+	id item;
+	id obj;
+    func(item, obj, context);
+}
+
+- (void)a:(id *)objects b:(id *)keys {
+    VoidStar dict;
+	id key;
+    RandomFunc((CFMDRef)dict, key, objects[3]);
+}
+@end