ObjectiveC ARC. Lookup type associated with objc_bridage at
the point of CF object type-cast and issue diagnostic
if it is not a valid ObjectiveC class. // rdar//15454846.
This is wip.

llvm-svn: 194861
diff --git a/clang/test/SemaObjC/objcbridge-attribute.m b/clang/test/SemaObjC/objcbridge-attribute.m
index 20e348c..ddf379a 100644
--- a/clang/test/SemaObjC/objcbridge-attribute.m
+++ b/clang/test/SemaObjC/objcbridge-attribute.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -verify -Wno-objc-root-class %s
 // rdar://15454846
 
 typedef struct __CFErrorRef * __attribute__ ((objc_bridge(NSError))) CFErrorRef;
@@ -27,3 +27,12 @@
 
 }
 @end
+
+@protocol NSTesting @end
+@class NSString;
+
+typedef struct __CFError * __attribute__((objc_bridge(NSTesting))) CFTestingRef; // expected-note {{declared here}}
+
+id foo(CFTestingRef cf) {
+  return (NSString *)cf; // expected-error {{CF object of type 'CFTestingRef' (aka 'struct __CFError *') with 'objc_bridge' attribute which has parameter that does not name an Objective-C class}}
+}