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