1 // RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin9 -Wno-objc-root-class %s
2 // expected-no-diagnostics
3 // FIXME: must also compile as Objective-C++
5 typedef struct objc_selector *SEL;
6 typedef signed char BOOL;
7 typedef unsigned int NSUInteger;
8 typedef struct _NSZone NSZone;
9 @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
11 - (BOOL)isEqual:(id)object;
12 - (BOOL)respondsToSelector:(SEL)aSelector;
15 - (id)copyWithZone:(NSZone *)zone;
17 @protocol NSMutableCopying
18 - (id)mutableCopyWithZone:(NSZone *)zone;
21 - (void)encodeWithCoder:(NSCoder *)aCoder;
23 @interface NSObject <NSObject> {}
25 @class NSString, NSData;
26 typedef struct _NSPoint {}
28 @interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding>
31 @interface NSMutableString : NSString
32 - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString;
34 @class NSArray, NSDictionary, NSMapTable;
35 @interface NSResponder : NSObject <NSCoding> {}
37 @protocol NSAnimatablePropertyContainer
40 extern NSString *NSAnimationTriggerOrderIn ;
41 @interface NSView : NSResponder <NSAnimatablePropertyContainer> {
42 struct __VFlags2 {} _vFlags2;
45 @class NSAttributedString, NSEvent, NSFont, NSFormatter, NSImage, NSMenu, NSText, NSView;
46 @interface FooiagramView : NSView {
51 @interface _FooiagramViewReserved : NSObject {
53 NSMutableString *_typeToSelectString;
54 struct _FooiagramViewFlags {
55 unsigned int delegateRespondsToPrintInfoForBarView : 1;
59 extern _FooiagramViewReserved *_FooiagramViewBarViewReserved(FooiagramView *BarView);
60 @interface FooiagramView (FooiagramViewPrivate)
61 + (Class)_defaultBarToolManagerClass;
63 @implementation FooiagramView
64 static NSMapTable *_defaultMenuForClass = 0;
65 - (void)setDelegate:(id)delegate {
66 if (_delegate != delegate) {
67 struct _FooiagramViewFlags *dvFlags =
68 &_FooiagramViewBarViewReserved(self)->_dvFlags;
69 if (_delegate != ((void *)0)) {
70 dvFlags->delegateRespondsToPrintInfoForBarView = [_delegate respondsToSelector:@selector(printInfoForBarView:)];
76 @interface WizKing_MIKeep {
77 struct __LoreStuffNode *_historyStuff;
80 typedef struct __LoreStuffNode {} LoreStuffNode;
81 @implementation WizKing_MIKeep
84 node = &(_historyStuff[1]);
89 typedef long unsigned int __darwin_size_t;
90 typedef __darwin_size_t size_t;
91 void *memset(void *, int, size_t);
92 @class NSString, NSURL, NSError;
93 @interface OingoWerdnaPeon : NSObject {}
95 OingoPT_SmashOK, OingoPT_NoSuchFile, }
96 OingoWerdnaPeonIOMethod;
97 @interface OingoWerdnaPeonSmashDrivel : NSObject <NSCopying> {}
99 @interface OingoBoingoContraptionPeon : OingoWerdnaPeon {
100 struct _OingoBoingoContraptionPeonFlags {}
104 @implementation OingoBoingoContraptionPeon
105 + (void)initialize {}
106 - (id)initWithSmashDrivel:(OingoWerdnaPeonSmashDrivel *)info {
107 if (self != ((void *)0)) {
108 (void)memset(&_nfttFlags, 0, sizeof(struct _OingoBoingoContraptionPeonFlags));
123 struct X *xp = &value;