1// RUN: %clang_cc1 -fsyntax-only -verify %s 2// expected-no-diagnostics 3typedef signed char BOOL; 4typedef unsigned int NSUInteger; 5@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; 6@protocol NSObject - (BOOL)isEqual:(id)object; @end 7@protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder; @end 8@interface NSObject <NSObject> {} @end 9typedef float CGFloat; 10typedef struct _NSSize {} NSSize; 11typedef struct _NSRect {} NSRect; 12@interface NSResponder : NSObject <NSCoding> {} @end 13@protocol NSAnimatablePropertyContainer - (id)animator; @end 14extern NSString *NSAnimationTriggerOrderIn ; 15@interface NSView : NSResponder <NSAnimatablePropertyContainer> {} @end 16@class NSAttributedString, NSEvent, NSFont, NSFormatter, NSImage, NSMenu, NSText, NSView; 17enum { NSBoxPrimary = 0, NSBoxSecondary = 1, NSBoxSeparator = 2, NSBoxOldStyle = 3, NSBoxCustom = 4}; 18typedef NSUInteger NSBoxType; 19@interface NSBox : NSView {} - (NSBoxType)boxType; @end 20@class NSArray, NSError, NSImage, NSView, NSNotificationCenter, NSURL; 21@interface NSProBox:NSBox {} @end 22enum IBKnobPosition { IBNoKnobPosition = -1, IBBottomLeftKnobPosition = 0, 23 IBMiddleLeftKnobPosition, IBTopLeftKnobPosition, 24 IBTopMiddleKnobPosition, IBTopRightKnobPosition, 25 IBMiddleRightKnobPosition, IBBottomRightKnobPosition, 26 IBBottomMiddleKnobPosition }; 27typedef enum IBKnobPosition IBKnobPosition; 28typedef struct _IBInset {} IBInset; 29@protocol IBObjectProtocol -(NSString *)inspectorClassName; @end 30@protocol IBViewProtocol 31 -(NSSize)minimumFrameSizeFromKnobPosition:(IBKnobPosition)position; 32 -(IBInset)ibShadowInset; 33@end 34@class NSPasteboard; 35@interface NSObject (NSObject_IBObjectProtocol) <IBObjectProtocol> @end 36@interface NSView (NSView_IBViewProtocol) <IBViewProtocol> - (NSRect)layoutRect; @end 37typedef enum { NSProTextFieldSquareBezel = 0, NSProTextFieldRoundedBezel = 1, NSProTextFieldDisplayBezel = 2 } MKModuleReusePolicy; 38@implementation NSProBox(IBAdditions) 39-(NSString *)inspectorClassName { return 0; } 40-(IBInset)ibShadowInset { 41 if ([self boxType] == NSBoxSeparator) { 42 return [super ibShadowInset]; 43 } 44 while (1) {} 45} 46-(NSSize)minimumFrameSizeFromKnobPosition:(IBKnobPosition)knobPosition { 47 if ([self boxType] != NSBoxSeparator) 48 return [super minimumFrameSizeFromKnobPosition:knobPosition]; 49 while (1) {} 50} 51@end 52