Support more implicit conversions for Objective-C types. Addresses <rdar://problem/6458293>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61255 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjCXX/overload.mm b/test/SemaObjCXX/overload.mm
index 0accb46..41865ff 100644
--- a/test/SemaObjCXX/overload.mm
+++ b/test/SemaObjCXX/overload.mm
@@ -45,9 +45,12 @@
   //  int& i3 = h(b); FIXME: we match GCC here, but shouldn't this work?
 }
 
-void downcast_test(A* a) {
+void downcast_test(A* a, A** ap) {
   B* b = a; // expected-warning{{incompatible pointer types initializing 'B *', expected 'A *'}}
   b = a;  // expected-warning{{incompatible pointer types assigning 'B *', expected 'A *'}}
+
+  B** bp = ap; // expected-warning{{incompatible pointer types initializing 'B **', expected 'A **'}}
+  bp = ap; // expected-warning{{incompatible pointer types assigning 'B **', expected 'A **'}}
 }
 
 int& cv(A*);
@@ -73,3 +76,15 @@
   int& i2 = qualid(b);
   float& f1 = qualid(c);
 }
+
+
+@class NSException;
+typedef struct {
+    void (*throw_exc)(id);
+}
+objc_exception_functions_t;
+
+void (*_NSExceptionRaiser(void))(NSException *) {
+    objc_exception_functions_t exc_funcs;
+    return exc_funcs.throw_exc; // expected-warning{{incompatible pointer types returning 'void (*)(NSException *)', expected 'void (*)(id)'}}
+}