Add analyzer test for using of C++ references with ObjC object pointers, reported in <rdar://problem/10569024>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150891 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/misc-ps-region-store.mm b/test/Analysis/misc-ps-region-store.mm
index fee9433..8615c6a 100644
--- a/test/Analysis/misc-ps-region-store.mm
+++ b/test/Analysis/misc-ps-region-store.mm
@@ -29,3 +29,20 @@
   return [p foo];
 }
 
+// Basic test of C++ references with Objective-C pointers.
+@interface RDar10569024
+@property(readonly) int x;
+@end
+
+typedef RDar10569024* RDar10569024Ref;
+
+void rdar10569024_aux(RDar10569024Ref o);
+
+int rdar10569024(id p, id collection) {
+  for (id elem in collection) {
+    const RDar10569024Ref &o = (RDar10569024Ref) elem;
+    rdar10569024_aux(o); // no-warning
+    return o.x; // no-warning
+  }
+  return 0;
+}