aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/arc-invalid.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/arc-invalid.m')
-rw-r--r--test/SemaObjC/arc-invalid.m28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/SemaObjC/arc-invalid.m b/test/SemaObjC/arc-invalid.m
index c736ed4a167c..07b6480c1f9b 100644
--- a/test/SemaObjC/arc-invalid.m
+++ b/test/SemaObjC/arc-invalid.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -fblocks -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -fblocks -Wno-objc-root-class -verify %s
// rdar://problem/10982793
// [p foo] in ARC creates a cleanup.
@@ -16,3 +16,29 @@ void test1(void) {
__autoreleasing id p; // expected-note {{'p' declared here}}
takeBlock(^{ (void) p; }); // expected-error {{cannot capture __autoreleasing variable in a block}}
}
+
+// rdar://17024681
+@class WebFrame;
+@interface WebView // expected-note {{previous definition is here}}
+- (WebFrame *)mainFrame;
+@end
+
+@interface WebView // expected-error {{duplicate interface definition for class 'WebView'}}
+@property (nonatomic, readonly, strong) WebFrame *mainFrame;
+@end
+
+@interface UIWebDocumentView
+- (WebView *)webView;
+@end
+
+@interface UIWebBrowserView : UIWebDocumentView
+@end
+
+@interface StoreBanner @end
+
+@implementation StoreBanner
++ (void)readMetaTagContentForUIWebBrowserView:(UIWebBrowserView *)browserView
+{
+ [[browserView webView] mainFrame];
+}
+@end