blob: bd68397fd96950e88b1b308445a3d3037693714c [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Steve Naroffcb28be62008-06-04 23:08:38 +00002typedef signed char BOOL;
3typedef unsigned int NSUInteger;
4typedef struct _NSZone NSZone;
5
6@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
7
Douglas Gregor4c4efee2011-06-13 16:42:53 +00008@protocol NSObject - (BOOL) isEqual:(id) object; - (id)init; @end
Steve Naroffcb28be62008-06-04 23:08:38 +00009@protocol NSCopying - (id) copyWithZone:(NSZone *) zone; @end
10@protocol NSCoding - (void) encodeWithCoder:(NSCoder *) aCoder; @end
11
12@interface NSObject < NSObject > {}
13+(id) alloc;
14@end
15
16typedef float CGFloat;
17
18@interface NSTask:NSObject
19- (id) init;
20@end
21
22typedef NSUInteger NSControlSize;
23typedef struct __CFlags {} _CFlags;
24
25@interface NSCell:NSObject < NSCopying, NSCoding > {}
26@end
27
28@interface NSActionCell:NSCell {} @end
29
30@class NSAttributedString, NSFont, NSImage, NSSound;
31
32typedef struct _XCElementInset {} XCElementInset;
33
34@protocol XCElementP < NSObject >
35-(BOOL) vertical;
36@end
37
38@protocol XCElementDisplayDelegateP;
39@protocol XCElementDisplayDelegateP < NSObject >
40-(void) configureForControlSize:(NSControlSize)size font:(NSFont *)font addDefaultSpace:(XCElementInset) additionalSpace;
41@end
42
43@protocol XCElementSpacerP < XCElementP >
44@end
45
46typedef NSObject < XCElementSpacerP > XCElementSpacer;
47
48@protocol XCElementTogglerP < XCElementP > -(void) setDisplayed:(BOOL) displayed;
49@end
50
Fariborz Jahaniane42670b2012-01-24 00:40:15 +000051typedef NSObject < XCElementTogglerP > XCElementToggler; // expected-note {{previous definition is here}}
Steve Naroffcb28be62008-06-04 23:08:38 +000052
53@interface XCElementRootFace:NSObject {} @end
54
55@interface XCElementFace:XCElementRootFace {} @end
56
Fariborz Jahaniane42670b2012-01-24 00:40:15 +000057@class XCElementToggler; // expected-warning {{redefinition of forward class 'XCElementToggler' of a typedef name of an object type is ignored}}
Steve Naroffcb28be62008-06-04 23:08:38 +000058
59@interface XCRASlice:XCElementFace {} @end
60
61@class XCElementSpacings;
62
63@interface XCElementDisplay:NSObject < XCElementDisplayDelegateP > {} @end
64@interface XCElementDisplayRect:XCElementDisplay {} @end
65
66typedef XCElementDisplayRect XCElementGraphicsRect;
67
68@interface XCElementDisplayFillerImage:XCElementDisplay {} @end
69
70@implementation XCRASlice
71- (void) addSliceWithLabel:(NSString *)label statusKey:(NSString *)statusKey disclosed:(BOOL)disclosed
72{
73 static XCElementGraphicsRect *_sGraphicsDelegate = ((void *) 0);
74 if (!_sGraphicsDelegate) {
Steve Naroff7c778f12008-07-25 19:39:00 +000075 _sGraphicsDelegate =[[XCElementGraphicsRect alloc] init];
Steve Naroffcb28be62008-06-04 23:08:38 +000076 }
77}
78@end