a forward class declaration matching a typedef name of a class
refers to the underlying class.
This is radar 6859726. Steve, please read the radar for my rational.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71181 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/forward-class-1.m b/test/SemaObjC/forward-class-1.m
index d8eb311..f5f9505 100644
--- a/test/SemaObjC/forward-class-1.m
+++ b/test/SemaObjC/forward-class-1.m
@@ -22,3 +22,26 @@
 
 @interface INTF2 : INTF1 // expected-error {{duplicate interface definition for class 'INTF2'}}
 @end
+
+// 2nd test of a forward class declaration matching a typedef name
+// referring to class object.
+// FIXME. This may become a negative test should we decide to make this an error.
+//
+@interface NSObject @end
+
+@protocol XCElementP @end
+
+typedef NSObject <XCElementP> XCElement;
+
+@interface XCElementMainImp  {
+  XCElement * _editingElement;
+}
+@end
+
+@class XCElement;
+
+@implementation XCElementMainImp
+- (XCElement *)editingElement  { return _editingElement;  }
+@end
+
+