1// RUN: %clang_cc1 %s -fsyntax-only -verify
2// expected-no-diagnostics
3// rdar://5967199
4
5typedef signed char BOOL;
6@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
7
8@protocol NSObject
9- (BOOL) isEqual:(id) object;
10@end
11
12@protocol NSCoding
13- (void) encodeWithCoder:(NSCoder *) aCoder;
14@end
15
16@interface NSObject < NSObject > {}
17@end
18
19typedef float CGFloat;
20typedef struct _NSPoint {} NSSize;
21typedef struct _NSRect {} NSRect;
22typedef enum { NSMinXEdge = 0, NSMinYEdge = 1, NSMaxXEdge = 2, NSMaxYEdge = 3} NSRectEdge;
23extern void NSDivideRect(NSRect inRect, NSRect * slice, NSRect * rem, CGFloat amount, NSRectEdge edge);
24
25@interface NSResponder:NSObject < NSCoding > {}
26@end
27
28@protocol NSAnimatablePropertyContainer
29- (id) animator;
30@end
31
32extern NSString *NSAnimationTriggerOrderIn;
33
34@interface NSView:NSResponder < NSAnimatablePropertyContainer > {}
35-(NSRect) bounds;
36@end
37
38enum {
39  NSBackgroundStyleLight = 0, NSBackgroundStyleDark, NSBackgroundStyleRaised, NSBackgroundStyleLowered
40};
41
42@interface NSTabView:NSView {}
43@end
44
45@ class OrganizerTabHeader;
46
47@interface OrganizerTabView:NSTabView {}
48@property(assign)
49NSSize minimumSize;
50@end
51
52@interface OrganizerTabView()
53@property(readonly) OrganizerTabHeader *tabHeaderView;
54@property(readonly) NSRect headerRect;
55@end
56
57@implementation OrganizerTabView
58@dynamic tabHeaderView, headerRect, minimumSize;
59-(CGFloat) tabAreaThickness { return 0; }
60-(NSRectEdge) rectEdgeForTabs {
61  NSRect dummy, result = {};
62  NSDivideRect(self.bounds, &result, &dummy, self.tabAreaThickness, self.rectEdgeForTabs);
63  return 0;
64}
65@end
66
67@class NSImage;
68
69@interface XCImageArchiveEntry : NSObject
70{
71  NSImage *_cachedImage;
72}
73
74@end
75
76@implementation XCImageArchiveEntry
77
78- (NSImage *)image
79{
80  return _cachedImage;
81}
82
83@end
84
85@interface XCImageArchive : NSObject
86@end
87
88@implementation XCImageArchive
89
90- (NSImage *)imageNamed:(NSString *)name
91{
92    XCImageArchiveEntry * entry;
93    return entry ? entry.image : ((void *)0);
94}
95
96@end
97