summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjC/forward-class-redeclare.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/forward-class-redeclare.m')
-rw-r--r--clang/test/SemaObjC/forward-class-redeclare.m29
1 files changed, 29 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/forward-class-redeclare.m b/clang/test/SemaObjC/forward-class-redeclare.m
new file mode 100644
index 0000000..80dc335
--- /dev/null
+++ b/clang/test/SemaObjC/forward-class-redeclare.m
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// rdar://10733000
+
+@interface NSObject @end
+
+@protocol PLAssetContainer
+@property (readonly, nonatomic, retain) id assets;
+@end
+
+
+typedef NSObject <PLAssetContainer> PLAlbum; // expected-note {{previous definition is here}}
+
+@class PLAlbum; // expected-warning {{redefinition of forward class 'PLAlbum' of a typedef name of an object type is ignore}}
+
+@interface PLPhotoBrowserController
+{
+ PLAlbum *_album;
+}
+@end
+
+@interface WPhotoViewController:PLPhotoBrowserController
+@end
+
+@implementation WPhotoViewController
+- (void)_prepareForContracting
+{
+ (void)_album.assets;
+}
+@end