79 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2typedef signed char BOOL;3typedef unsigned int NSUInteger;4typedef struct _NSZone NSZone;5 6@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;7 8@protocol NSObject - (BOOL) isEqual:(id) object; - (id)init; @end9@protocol NSCopying - (id) copyWithZone:(NSZone *) zone; @end10@protocol NSCoding - (void) encodeWithCoder:(NSCoder *) aCoder; @end11 12@interface NSObject < NSObject > {}13+(id) alloc;14@end15 16typedef float CGFloat;17 18@interface NSTask:NSObject19- (id) init;20@end21 22typedef NSUInteger NSControlSize;23typedef struct __CFlags {} _CFlags;24 25@interface NSCell:NSObject < NSCopying, NSCoding > {}26@end27 28@interface NSActionCell:NSCell {} @end29 30@class NSAttributedString, NSFont, NSImage, NSSound;31 32typedef struct _XCElementInset {} XCElementInset;33 34@protocol XCElementP < NSObject >35-(BOOL) vertical;36@end37 38@protocol XCElementDisplayDelegateP;39@protocol XCElementDisplayDelegateP < NSObject >40-(void) configureForControlSize:(NSControlSize)size font:(NSFont *)font addDefaultSpace:(XCElementInset) additionalSpace;41@end42 43@protocol XCElementSpacerP < XCElementP >44@end45 46typedef NSObject < XCElementSpacerP > XCElementSpacer;47 48@protocol XCElementTogglerP < XCElementP > -(void) setDisplayed:(BOOL) displayed;49@end50 51typedef NSObject < XCElementTogglerP > XCElementToggler; // expected-note {{previous definition is here}}52 53@interface XCElementRootFace:NSObject {} @end54 55@interface XCElementFace:XCElementRootFace {} @end56 57@class XCElementToggler; // expected-warning {{redefinition of forward class 'XCElementToggler' of a typedef name of an object type is ignored}}58 59@interface XCRASlice:XCElementFace {} @end60 61@class XCElementSpacings;62 63@interface XCElementDisplay:NSObject < XCElementDisplayDelegateP > {} @end64@interface XCElementDisplayRect:XCElementDisplay {} @end65 66typedef XCElementDisplayRect XCElementGraphicsRect;67 68@interface XCElementDisplayFillerImage:XCElementDisplay {} @end69 70@implementation XCRASlice71- (void) addSliceWithLabel:(NSString *)label statusKey:(NSString *)statusKey disclosed:(BOOL)disclosed72{73 static XCElementGraphicsRect *_sGraphicsDelegate = ((void *) 0);74 if (!_sGraphicsDelegate) {75 _sGraphicsDelegate =[[XCElementGraphicsRect alloc] init]; 76 }77}78@end79