Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Steve Naroff | cb28be6 | 2008-06-04 23:08:38 +0000 | [diff] [blame] | 2 | typedef signed char BOOL; |
| 3 | typedef unsigned int NSUInteger; |
| 4 | typedef struct _NSZone NSZone; |
| 5 | |
| 6 | @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; |
| 7 | |
Douglas Gregor | 4c4efee | 2011-06-13 16:42:53 +0000 | [diff] [blame] | 8 | @protocol NSObject - (BOOL) isEqual:(id) object; - (id)init; @end |
Steve Naroff | cb28be6 | 2008-06-04 23:08:38 +0000 | [diff] [blame] | 9 | @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 | |
| 16 | typedef float CGFloat; |
| 17 | |
| 18 | @interface NSTask:NSObject |
| 19 | - (id) init; |
| 20 | @end |
| 21 | |
| 22 | typedef NSUInteger NSControlSize; |
| 23 | typedef 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 | |
| 32 | typedef 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 | |
| 46 | typedef NSObject < XCElementSpacerP > XCElementSpacer; |
| 47 | |
| 48 | @protocol XCElementTogglerP < XCElementP > -(void) setDisplayed:(BOOL) displayed; |
| 49 | @end |
| 50 | |
Fariborz Jahanian | e42670b | 2012-01-24 00:40:15 +0000 | [diff] [blame] | 51 | typedef NSObject < XCElementTogglerP > XCElementToggler; // expected-note {{previous definition is here}} |
Steve Naroff | cb28be6 | 2008-06-04 23:08:38 +0000 | [diff] [blame] | 52 | |
| 53 | @interface XCElementRootFace:NSObject {} @end |
| 54 | |
| 55 | @interface XCElementFace:XCElementRootFace {} @end |
| 56 | |
Fariborz Jahanian | e42670b | 2012-01-24 00:40:15 +0000 | [diff] [blame] | 57 | @class XCElementToggler; // expected-warning {{redefinition of forward class 'XCElementToggler' of a typedef name of an object type is ignored}} |
Steve Naroff | cb28be6 | 2008-06-04 23:08:38 +0000 | [diff] [blame] | 58 | |
| 59 | @interface XCRASlice:XCElementFace {} @end |
| 60 | |
| 61 | @class XCElementSpacings; |
| 62 | |
| 63 | @interface XCElementDisplay:NSObject < XCElementDisplayDelegateP > {} @end |
| 64 | @interface XCElementDisplayRect:XCElementDisplay {} @end |
| 65 | |
| 66 | typedef 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 Naroff | 7c778f1 | 2008-07-25 19:39:00 +0000 | [diff] [blame] | 75 | _sGraphicsDelegate =[[XCElementGraphicsRect alloc] init]; |
Steve Naroff | cb28be6 | 2008-06-04 23:08:38 +0000 | [diff] [blame] | 76 | } |
| 77 | } |
| 78 | @end |