1 // RUN: %clang_cc1 -fsyntax-only -verify %s
4 @protocol NSObject @end
6 @interface NSObject <NSObject> @end
8 @interface UIResponder : NSObject
11 @implementation UIResponder
14 @interface UIView : UIResponder
17 @implementation UIView
20 @interface UIWebTiledView : UIView
23 @implementation UIWebTiledView
26 @interface UIWebDocumentView : UIWebTiledView
29 @implementation UIWebDocumentView
32 @interface UIWebBrowserView : UIWebDocumentView
35 @implementation UIWebBrowserView
38 @interface UIPDFView : UIView
41 @implementation UIPDFView
44 @interface UIWebPDFView : UIPDFView
47 @implementation UIWebPDFView
50 UIWebPDFView *getView()
52 UIWebBrowserView *browserView;
53 UIWebPDFView *pdfView;
54 return pdfView ? pdfView : browserView; // expected-warning {{incompatible pointer types returning 'UIView *' from a function with result type 'UIWebPDFView *'}}