brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · 9972a58 Raw
127 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin9 -Wno-objc-root-class %s2// expected-no-diagnostics3// FIXME: must also compile as Objective-C++ 4 5typedef struct objc_selector *SEL;6typedef signed char BOOL;7typedef unsigned int NSUInteger;8typedef struct _NSZone NSZone;9@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;10@protocol NSObject11- (BOOL)isEqual:(id)object;12- (BOOL)respondsToSelector:(SEL)aSelector;13@end14@protocol NSCopying15- (id)copyWithZone:(NSZone *)zone;16@end17@protocol NSMutableCopying18- (id)mutableCopyWithZone:(NSZone *)zone;19@end20@protocol NSCoding21- (void)encodeWithCoder:(NSCoder *)aCoder;22@end23@interface NSObject <NSObject> {}24@end25@class NSString, NSData;26typedef struct _NSPoint {}27NSRange;28@interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding>29- (NSUInteger)length;30@end31@interface NSMutableString : NSString32- (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString;33@end34@class NSArray, NSDictionary, NSMapTable;35@interface NSResponder : NSObject <NSCoding> {}36@end37@protocol NSAnimatablePropertyContainer38- (id)animator;39@end40extern NSString *NSAnimationTriggerOrderIn ;41@interface NSView : NSResponder  <NSAnimatablePropertyContainer>  {42  struct __VFlags2 {} _vFlags2;43}44@end45@class NSAttributedString, NSEvent, NSFont, NSFormatter, NSImage, NSMenu, NSText, NSView;46@interface FooiagramView : NSView {47id _delegate;48}49@end50@class FooiagramView;51@interface _FooiagramViewReserved : NSObject {52@public53  NSMutableString *_typeToSelectString;54  struct _FooiagramViewFlags {55      unsigned int delegateRespondsToPrintInfoForBarView : 1;56  } _dvFlags;57}58@end59extern _FooiagramViewReserved *_FooiagramViewBarViewReserved(FooiagramView *BarView);60@interface FooiagramView (FooiagramViewPrivate)61+ (Class)_defaultBarToolManagerClass;62@end63@implementation FooiagramView64static 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:)];71    }72  }73}74@end75 76@interface WizKing_MIKeep {77struct __LoreStuffNode *_historyStuff;78}79@end80typedef struct __LoreStuffNode {} LoreStuffNode;81@implementation WizKing_MIKeep82- init {83  LoreStuffNode *node;84  node = &(_historyStuff[1]);85  return 0;86}87@end88 89typedef long unsigned int __darwin_size_t;90typedef __darwin_size_t size_t;91void *memset(void *, int, size_t);92@class NSString, NSURL, NSError;93@interface OingoWerdnaPeon : NSObject {}94@end        typedef enum {95OingoPT_SmashOK,     OingoPT_NoSuchFile, }96OingoWerdnaPeonIOMethod;97@interface OingoWerdnaPeonSmashDrivel : NSObject <NSCopying> {}98@end99@interface OingoBoingoContraptionPeon : OingoWerdnaPeon {100struct _OingoBoingoContraptionPeonFlags {}101_nfttFlags;102}103@end104@implementation OingoBoingoContraptionPeon105+ (void)initialize {}106- (id)initWithSmashDrivel:(OingoWerdnaPeonSmashDrivel *)info {107  if (self != ((void *)0)) {108    (void)memset(&_nfttFlags, 0, sizeof(struct _OingoBoingoContraptionPeonFlags));109  }110  return 0;111}112@end113 114@interface Blah {115  struct X {116    int x;117  } value;118}119@end120 121@implementation Blah122- (int)getValue {123  struct X *xp = &value;124  return xp->x;125}126@end127